Swinging the putter on the correct path and returning the face to square at impact relies on the number of moving body parts being reduced as much as possible. The arms will move but only as a result of the back and shoulder muscles but what certainly should not move is the legs.
Too often, amateur players try to get a sneaky peak at the hole before striking the ball, especially on short putts, as TG Elite Pro Chris Ryan explains in this golf video tip. Taking control of the stroke and especially the clubface means no leg action whatsoever.
Any leg action, either during the backswing or downswing, will compromise the clubface alignment and increase the chances of hitting the ball left or right.
So as a drill to prevent this, take your starting position and rest a cane or club against the top of your back leg. Hit some putts trying to keep the cane in place. Because your thigh is rounded, any leg movement will cause the cane to fall to the ground.