No single right answer, I have a Mossberg and a Winchester both loaded one pump the other semi-auto. one 12 gauge the other 20 gauge leaning against the wall by my bedroom door both available, if needed. Bad guy really won't care what the bore is, he will only see a hole big enough to drive a semi-truck into. He won't care what the action is only what comes out of the barrel and how much it is going to hurt.Ok, I am looking to purchase a shotgun for home defense. I'm looking for something in the sub $300 category. I am thinking 12 or 20 ga. Something I could have at the house for HD but also take out every once in a while and have some fun wasting a few shells.
For your multi-purpose use, (both of mine double as deer and turkey guns besides HD), I would stick with a straight stock moderate length barrel. magnum loads not required for in house distances so 2 3/4" shells of whatever slug or shot you decide on will be more than sufficient. More important is stock fit of the gun to you. You don't want to be trying to wrestle a to long stock into position at dark thirty at night and then take a beating because you are not wearing a shooting jacket when y9u get out of bed. It's also another reason you don't need magnum class shells in your gun.
Find a gun fun to shoot that you can hit your intended target with. If its fun you are more likely to take it out and play with it more often. The more you play with it the more familiar you get with the gun. This helps more than you can imagine when things go bump in the dark and your adrenaline starts pumping by the gallon. This is why I do not recommend a particular make or model or even gauge. What works for me may be completely wrong for you or your neighbor or your wife. Get what feels right for you.
Best bet if you don't have a shooting buddy with a variety of shotguns to play around with is to go to a local skeet/trap range and talk to the old timers there. Most like to talk about guns for some strange reason and if you are serious and respectful some will let you try what they have. I do not recommend a trap gun for HD but I bet you will find these guys are hunters, ex military, some will be cops. They will all have different degrees of experience which will do you a lot of good.