I prefer them in PvE.
The only time I prefer shotguns in PvE is when either
A) I'm against yellow-bars with easy to hit heads
B) I have a nice full-auto shotgun, tether a heavy baddie, and just unload at point-blank.
Beyond that, I prefer fusion rifles in Pve; and sometimes snipers.
-----------------
As for PvP... forget about it. I only have luck when I'm in a hunter with the high-rez / marked radar and hiding behind a corner when the guy is about to come around.
I don't like using shotguns, and honestly only use my "secondary" when there's a bounty involved.