Lots of opinions, here. Some good reasoning mixed in.
"Rifles are the queen of defensive firearms". Jeff Cooper said something to that effect, and I believe it is true, for the following reasons...
1) PENETRATION
The purpose of a firearm is to PENETRATE. Rifles in mil chamberings have as good or much better penetration performance than shotguns, and rifles feature a wider selection of projectile type/use capability.
Indoor overpenetration is not miraculously affected by use of a shotgun, as indoor structures tend toward concealment rather than cover when using a full-powered long gun. If there's a certain danger of overpenetration and a friendly in the area, you probably shouldn't shoot at that angle. Choose appropriate ammo for your surroundings and TEST that ammo/weapon combo with material representative of your surroundings.
2) SHOT PLACEMENT
If you have PENETRATION but can't place those shots, your plan of action is significantly compromised. SHOT PLACEMENT is everything in a hostile encounter.
A shotgun is plenty lethal in short-range and even some open area, mid-range defense scenarios. However, a rifle offers something a shotgun can't: PRECISION AND DISCRIMINATION at ALL defensive ranges.
With a shotgun, if your subject is using cover (whether it's deer or a perp), you're relying a lot more on chance rather than cartridge performance. With a rifle and dedication to proficiency, you're capable of dealing with a much wider range of scenarios including distance, barriers and precision. Use your imagination; in the home, in your vehicle, in your neighborhood, etc.
3) AMMUNITION
Decent defensive shotgun ammo is as- or more-expensive than comparable military-quality rifle rounds. In a really crappy world situation, a chambering in a military caliber makes more sense than a limited-range, limited-availability chambering such as 12ga.
4) TRAINING
Even though we really enjoy firearms, most of us have busy life schedules and very limited time for weapons training. With limited time I want to train with an all-around firearm rather than a weapon that has its own restrictions. For most of us, that means a sidearm (CHL) and/or rifle.
SUMMARY
Is the shotgun a worthless piece of junk? No, I'm not saying that. It has its place. My patrol vehicle has shotgun and rifle at the ready. I will gladly use either over my sidearm. However, given the choice of long guns, I will choose the rifle 100% of the time, with the shotgun available as a backup or special use tool.
The rifle gives me penetration, precision, ammo availability and the best bang for my training buck/time. Everything else is play at best and failure to prepare at worst.
-josh