The fact of the matter is...if you miss a human target inside a home, its more than likely going to go through a few walls minimum no matter what firearm you use or ammunition selection to my knowledge. I did however read on a 12ga shotshell design that supposedly penetrates one wall and falls down a few feet later, but I can't seem to dig up the link...seemed fishy.
I feel the statement made about shooting through walls into the kitchen can be negligent if you live in a suburban area where the "desired overpenetration" stated could overpenetrate your house into your neighbor's home and in turn penetrate them. Granted I don't know the area or homestead Tread On Me's resides in, but that statement won't work for all of us; it certainly won't work for me.
Reasoning that maximum penetration is wanted would be dangerous to some of us and contradict "know what is beyond your target" but a lot of lines of reasoning in high-stress live/death situations are simplified to fight-or-flight. Overpenetration in an apartment or suburban situation requires one to think about his or her fellow man. If you live in the boonies, it might be more acceptable to clear hallways with .50BMG and have no seconds thoughts in intimidating a robber with a 40lb piece of high-powered steel.
With that being said, informal tests by Box O' Truth show frangible 223 and buckshot ammunition to be reasonably close in penetration depth compared to one another...on the order of 4-5 walls at a perpendicular angle if you miss the target and hit nothing but wall. Also given most homes are constructed with 2x4 studs 16" between center, theres a 9.4% chance of hitting a stud shooting at any wall span and penetration is reduced (though I wouldn't depend on that useless fact for much other than curiosity).
Most of us are governed by a 16" rifle barrel and would probably select something along the lines of a frangible or hollowpoint ammunition. 30 respective rounds of rifle ammunition would give you 30 tries, and 30-hit or-misses.
Pistols offer unmatchable maneuverability and reasonable stopping power. It won't hang you up by being too long to swing around narrow hallways or obstacles. It falls between a shotgun and rifle on ammunition capacity. However pistols are generally take more time to train with depending on who you are (gun newbie, pistol veteran,etc). Most unexperienced people with a shotgun or rifle can hit targets at 25yrds but not with a pistol, especially heavy triggers on double action revolvers. However not everyone has a 25yard hallway in their home.
6 rounds of 000 buckshot is equivalent to being hit by a 48 round burst of 9mm fire. I can't imagine someone surviving all 6 rounds taken to center mass. You get 6 tries but each hit is going to be taking 8 pellets at a time so each hit you get is going to be hard hitting.
Contrary to popular belief on how a shotgun doesn't have to be aimed and can take out multiple people in one blast, the spread is usually on the order of 1" per yard in an open cylinder bore shotgun. Shooting someone in a home-type environment (unless you live in a mansion) with 8 pellets and a high-velocity hard plastic shotcup from one round of 000 buckshot will leave a grouping so small, you minus well consider it one big messy hole.
For home defense right now, I use a semi-automatic Saiga 12ga "assault shotgun" with a 5 round box magazine loaded with 000 buckshots. I can empty the magazine before the first empty shell hits the ground. It maneuvers like a rifle and hits like a shotgun. I also aquired an AR15 and I'll keep a magazine with hollowpoints and frangibles for home defense but I would make the choice of grabbing the shotgun first.
My summary? Pistols vs shotguns vs rifles as a home defense weapon will never be settled on and universally agreed upon. Everyone here, and even the "experts" in magazines, books, or institutions don't agree with one another for various reasons. Pick what is most suitable to your specific environment and abilities.