Shotguns only really work when they have the same Strength as the models using them.
Guardsmen with S3 shotguns, or Marines with S4 (like BA and DA) are very effective in the first turn of an assault, even compared to pistol and CCW.
Pistol & CCW gets one attack that hits on a 3+, followed by 3 attacks that hit on a 4+ all of them have the same Str, and the AP value is usually low enough not to make much difference.
Shotgun gets two attacks that hit on a 3+, followed by 2 attacks that hit on a 4+ again, same strength but no AP.
The shotgun gives you more shooting attacks, attacks that are going to hit more often and (most importantly) get counted before any of the melee attacks, effectively giving you a temporary initiative boost for your first couple attacks.
This makes shotguns very effective in the first turn of the assault. But they become less effective in subsequent rounds because you're giving up the attack.
It all depends on the strength of the shotgun and the enemies you;re up against. S4 shotguns against models with a 4+ por greater armor save and/or an initiative higher than yours are a more desireable option, IMO...particularly if the target squad is small enough to take down in the first turn.
However, if you;re going against, say, orks or guard where there's going to e a lot of them, they swing after you and their armor is low enough that the BP can defeat it, then go for pistols.