The priority when playing a fairway bunker shot is to get the ball out of the bunker.
Rather than looking at the distance you have from the bunker to the green, look at the trajectory you need to clear the bunker face. The trajectory required is what will select the club to be played, not the distance remaining to the green because it is no good firing the ball straight into the bunker face, you will have gained nothing.
Once you have decided on the club that will give you the trajectory to clear the bunker face, you can now set up ready to play the shot. Remember to hold the club head above the sand before you play the shot. If you allow the club head to touch the sand as you are setting up to play you will incur a penalty shot!
You need to strike the ball cleanly and then hit the sand when playing this shot effectively so wriggle your feet into the sand to get a firm base to swing from but then hold lower down on the handle than usual to shorten the length of the club. This will encourage the club head to swing above the sand rather than into it.
Focus on the top of the golf ball and work on maintaining a constant posture, head height and spine angle as you swing the golf club. Maintain the same amount of flex in your knees and this will prevent you from dropping down towards the sand as you swing which would result in the club head striking the sand before the ball and reduce the distance of the shot you are playing.
Keep your swing smooth and steady. Take an extra club so you can make an easier swing rather than taking less club and forcing it for distance, but again only do this if the trajectory required to clear the bunker face allows this.
Work on achieving a sweeping action with the club head through impact so set up with your weight even to encourage this. Swing with a U shape feel so that you have a gentle shallow approach in the club head towards the ball encouraging you to clip the ball off the sand without hitting the sand before the ball, and allow your right foot to rotate towards the target and your sole to come up off the sand as you follow through. Playing the shot and finishing with your right foot flat on the sand will promote you to strike the sand before the ball instead of clipping the ball off the surface first.
Work on these points and you will soon be hitting really effective fairway bunker shots that get you right back into a great scoring position on the hole.