Extreme CQB is what a shotgun is good for, also low numbers of hostile targets within CQB range. Anything past 75 yards forget it. Yes it's effective range is beyond that but if I am expecting anything much past 100 I am grabbing something else.
Shotguns limited capacity is why I mentioned low number of hostile targets. Shotguns cant effectively carry much ammo where most SMG's and carbine type rifle hold 30 rounds easily with a rapid reload also easily achieved.