As the resident 'gun guy' in my circle of 'gun guy' friends, I always make this recommendation.
A handgun is for portable defense, not necessarily home defense. Basically, a handgun is only useful if you don't have a long gun, and that's that. In my home I would only use my handgun to get safely to my shotgun, and that's no exaggeration. I would head for my shotgun before even considering heading toward the intruder.
If you don't need portability, and you won't need concealment, and the gun is going to stay at home for home safety, then buy a shotgun and 00 buckshot or 0 buckshot. Here are the reasons I cite.
1.) They are cheap. I recently picked up a Mossberg 500A in "duck hunting" configuration for $200 and tacticalized it for about $150.
2.) Short range stopping power can't be beat.
3.) At 3:00 in the morning after being waken from a dead sleep, they are very easy to operate and hard to point at yourself or others while trying to wipe the sleep from your eyes and finding the safety.
4.) The pellets from 00 or 0 buck are roughly .32 in caliber, and you 8 or 9 pellets per shot. That's lilke shooting the bad guy 9 times
simultaneously. Most won't get back up from one shot of that.
5.) The pellets, if you buy the right kind, are raw lead not jacketed. When they strike something solid they deform and destabilize, and lose velocity fast. The likelihood of a pellet exiting your exterior walls and entering a neighbors house with damaging amounts of mass or velocity left is greatly reduced (but not eliminated).
6.) Again, at 3:00 in the morning, still with sleep in your eyes and wondering what the hell is going on, shot placement with a 12GA isn't exactly the most important thing. So long as you get the pattern on target somewhere it will likely do the trick.
7.) The rack of a shotgun slide is the most terrifying thing a home invader can hear, and one of the most comforting things you will hear. The tables will turn instantly in both your mind and the intruders and that can give you a great advantage. Psychologically the intruder is very likely to go from predator to prey as soon as that sound is heard.
If my home web server is up and running (which it isn't 24/7) then you can look at the tactical transformation of a $200 shotgun
here.