If you mean a paved shoulder that’s about 3’ or wider, why not take that? Having said that, my basic philosophy is to take the lane – and even if the shoulder is wide, I ride far left.
My consistent experience is this makes you more visible and causes drivers to regard you as a road user rather than something along the side of the road. At least as important is doing this lets you know who’s watching you while creating space for you to maneuver.
Even when you’re not directly in their path, drivers naturally adjust their course if they see you and the feel it’s close. When they do so, you can tell they see you so you know they won’t hit. The drivers behind them that can’t see you yet will naturally track behind them – this is very useful, especially if one of them is hauling a load that hangs over the side or is otherwise wide.
This kind of tactic is especially useful in areas like St John’s Bridge and other fast roads in the PDX area with no shoulder where the lane bumps up against a curb.
Riding left causes drivers to treat you significantly better. When I ride way left on a road where there’s not room for a safe pass and see vehicles slow down as they approach, I drift right and motion for a close pass. I find this gets pretty nice treatment and even thanks – even though I intentionally slowed them down Then I move back left and the process repeats.
When you ride too far right, drivers don’t see you, and if they do it’s much less likely for you to register on them as a road user. Plus, when you communicate the expectation that you don’t belong there, they’ll believe you.
Rules for dealing with drivers are the same as for dealing with large hostile dogs. You’ll get far better outcomes if you’re calm, assertive, and communicate your expectations.