There are number of things to consider if you land in a sand trap. One basic rule you must always follow, is that you cannot touch the sand before you make contact with the ball. Doing this will invoke a penalty in the way of an extra stoke added to your score. Also, when you get in the sand beside your ball, make sure that you hover your club above the ball.
One of the basic rules to good putter swing technique, is keeping the head of the putter square to the ball when you strike it. Keeping the head of the putter square when striking the ball, will ensure a straight shot.
When your hand is placed under the golf grip (facing the sky), or on top of it (facing the ground), you will in all probability alter the swing plane direction as you swing back away from the ball. Remember to build your golf swing around the design of the golf club which means that your rest it on the ground and point it towards your intended target. When you swing it away there are two basic but very important stages that your golf club should travel through.
It is unobstructed visualisation directed unhindered to the brain which in turn sets the body in motion. Pure and simple.
If you raise your left heel during the backswing, place it back firmly on the ground at the beginning of the downswing and maintain both feet in this position throughout impact with the ball. They are the foundation of a smooth, solid swing. This will start the weight shift back to the left side. The left hip now starts the downswing, pulling the hands, arms and club down to the midpoint position.
What do the hands do? After they have ensured that the club begins the swing on the correct path, they help lift the club to the top of the backswing, but after the first few feet the club moves away from the ball, it is primarily the body that moves the club. From the top of the backswing, the hands do nothing more than hold onto the club for the rest of the way.