For a main battle rifle? No. I agree with the above poster who said a primary combat weapon should be a radio (technically the brain but communications are vital too). Then again the same applies for the police, the radio, but for law enforcement applications the shotgun has much more versatility going for it than the carbine but in my opinion, takes more skill to properly use and apply in a use of force scenario without introducing a ton of risk and liability.
Even though I see the benefits of the carbine for home defense, to this day I still have a 12ga. next to my bed. There is just no arguing the capabilities of a shotgun in a close quarter situation. But if the world ended in a zombie apocalypse, the shotgun would not be my first choice as the cons outweigh the pros.
Cons:
Ammo is heavier
Limited range
Takes more skill and training to use effectively than a carbine (my opinion...ymmv)
Slower followup shots (see above)
Harder/slower to reload (see above)
Harder to aim accurately at distance (see above)
Lacks precision (but can be accurate in the right hands...see above)
Pros:
Hits harder than anything legally obtainable by the average person
Versatile loads (non-lethal, etc)
Can breach barriers (though shape charges or even a ram would be more effective and less dangerous)
Is inexpensive to make the initial purchase (a decent shotgun is less than half the price of a decent carbine...if that)
That said, when most people utter the magical words "for home defense" in a gun shop the first thing they grab 9 out of 10 times is a shotgun. Then idiocy really starts up like "just the sound of a shotgun being cocked with scare off a bad guy" or my favorite "you don't even need to aim, just point it" and all the other crap we've all heard countless times. The fact is most people have a shotgun they've never trained with, they have possibly never fired more than once or twice, loaded with rounds they don't even understand the capabilities of, and have a complete false sense of security about when in fact they are their own greatest liability. But I'll get off my soapbox.
Can a shotgun be fielded in a combat situation? Yes, and it has (WW1 and WW2 specifically in the Pacific). Is it the best choice? Probably not, though in a dedicated urban environment as part of a raid team? Sure, assuming the operator knows what they have and trains with it.
Is the shotgun obsolete? Not any more than a bayonet, a 1911 (or any .45), or the M1A/M14, or bolt actions. It is a specific tool for a specific kind of job and the fact that it is still in use speaks volumes about its application in those specific roles.