Learning to swing the club from the inside is something you have to practice. Most amateurs naturally swing the club to the outside of the ball on the downswing. By reaching out too far on the downswing, the clubhead angles to the left of the target line at impact (for right-handers), producing off-line shots. Proper setup position, weight shift, shoulder turn and downswing are critical to swinging from the inside. Practice these fundamentals and you can swing the club from the inside and hit straighter shots.
Grip the club and take a shoulder-width stance. Align your feet and shoulders parallel to your target line or slightly to the right (for a right-handed golfer). Aligning your shoulders and hips slightly to the right of the target makes it much easier to swing from the inside. Keep the clubface directed at the target even if you aim your shoulders and hips to the right. Tilt your upper body slightly away from the target (toward your right foot for a right-handed golfer). This tilt in your upper body at setup will help you with your weight shift and shoulder turn.
Swing the club back with your shoulders. Let the majority of your weight shift back to the inside of your right foot during the backswing. A proper weight shift makes it easier to achieve a full shoulder turn on the backswing. Stop your backswing when your left shoulder has rotated under your chin.
Start the downswing with your lower body. Initiating the downswing with the lower body helps the club drop to an inside path. Swing the club down to the ball and swing to the right of the target. Swinging down from the inside with a square clubface will produce a straight or right-to-left shot.