A shanked shot is struck on the hosel or neck of the club rather than on the clubface. This occurs because the club has moved outward or farther from the player at impact than it was at address. Generally the problem originates at address with the ball played too far forward and the player's shoulders aligned left rather than parallel to the target line. In an effort to get the club back to the inside the club is swung too far around and behind the player. During the downswing the club is then swung too much around and outward so that the clubface is beyond the ball creating a shank. To correct this move the ball further back in your stance which will then make it easier to align your shoulders parallel to the target line. The proper shoulder alignment will allow you to swing the club upward on the backswing, and therefore downward rather than outward when changing directions.
Another cause of shanked shots is a player's weight shifting out toward his toes during the swing. This results in the hands and clubhead being further away from the player's body at impact than they were at address. To correct this set up with your weight more towards your heels. To help you acheive this try either curling your toes up inside your shoes or place a golf ball under the toe of each shoe. Then place a ball or head cover about an inch outside your ball and practice shots without hitting the outer ball or headcover.
Practice one of these two methods and your shanks will be a thing of the past.