Asking that question on this forum is a lot like yelling FOOD FIGHT!!! in a sixth grade cafeteria.
It depends on where you live, what you can afford and what you are comfortable with. I live in an apartment and have to worry about penetrating too much into the neighbor's space. I own a 12 gauge shotgun. Shotguns are great close in weapons and their knock down power beats any handgun. Contrary to popular belief, it takes as much practice use a shotgun effectively as it does a rifle and pattern spread at home defense ranges is only about 3 or 4 inches. Learning to master the recoil of a shotgun is also something that comes with practice. A good pump action shotgun can be had for between $180 and $300
If I lived in a rural area where threats may be further away and I didn't have to worry as much about where the the expended load wound up I'd go with a modern carbine, like an AR15 or AK47. Rifles have better range and lower recoil than shotguns and far better range and knock down power than a handgun. They are in general a better choice for personal defense which is why every army in the world uses one as their standard infantry weapon. Last time I priced them, AKs were about $750 and AR15 clones go for around $1000. Rifle ammo is generally cheaper than home defense shotgun ammo.
A handgun, .40 caliber and up, is suitable as a backup for home defense but be prepared to put multiple shots into the threat to neutralize it. It's also much harder to hit a target with a pistol than a rifle or shotgun because of the short barrel and short sight radius. For that reason, personally I'd prefer not to trust my life to one if I didn't have to.
Notice, I haven't mentioned any brand names. That's because knowing how to use the weapon you have well is more important than the brand name stamped into it. As long as it's a reliable weapon from a quality manufacturer, brand distinctions are largely a matter of budget and personal preference. And also because when people start talking about brand names that's when the food fight starts. :o)
Great info - many thanks