A couple years back I believe I either started a thread, or posted in one, that I was thinking about buying a firearm for recreational shooting but primarily the decision was motivated by home defense. The decision took a while. I did quite a bit o' research.
A handgun would be nice, since you can get very nice and quick-access-in-the-dark safes (biometric fingerprint scanning, even). But, I ultimately ruled them out because I am fairly sure that in a true life or death situation your nerves your going to play hell with your aim. I think down the line I'd still like to get one, though.
No, I wound up purchasing
12 gauge pump ation Remington 870 Wingmaster shotgun. I will be purchasing an 18" barrel and light/laser combo for it as well.
I settled on the 870 for a few reasons. One, a shotgun requires aim, but far less so than that of a handgun. And the fact you can hold it with both hands and keep it close to your body will lessen the "nerves" factor. Two, a pump action is very reliable and easy to clear a jam (if you ever have one). And three, the "rack rack" sound of a shell loading into a chamber will make it very clear to anyone during a home invasion as to what's going on.
But, mostly, I wanted to be a bit more ready when the Zombie Apocalypse inevitably happens. And, I'll be doubly ready if the zombies start throwing clay pigeons at me.