I'll second what other have said, but, in particular, stay off the pavement. Pavement riding is one of the most dangerous things you can do on a bike. Passing vehicles who want to make a left turn, aren't looking for vehicles off the road. They will left-hook you. Cars coming out of side roads and driveways aren't looking for you. They will pull all the way up to the road, to stop and wait for traffic. They aren't expecting someone to cross the road or driveway 8 feet before the intersection. Get out there and take the lane. Use the road the same way that cars do, and don't do anything that a car can't do...be visible, and be PREDICTABLE. When cars approach from behind, if you are going slower, MOST of them will do exactly what they would do if they came up behind a horse, carriage, tractor, street sweeper, or any other slower vehicle...they will wait until the adjacent lane is clear, change lanes, and pass.
Yes, you will get the rare idiot who will shout and curse you. It's rare. Ride on.
Now, that having been said, if the road has a nice wide shoulder...then, out of courtesy, move over if the traffic is heavy. But, you will get more punctures. There is a lot of debris on shoulders. When you can, get back out there, even on a wide road.
The main thing to realise about shoulder-hugging is, if the road is too narrow for a car to safely pass in your lane, then hugging the shoulder encourages the motorist to pass, anyway. That will get you into some tight spots. Better to get out in the lane, and make him go around. Know when to share the lane, and when to take the lane.