Ah the home defense shotgun. Effective intruder defense in one's own home begins and, in most cases, ends with a good shotgun.
Well, a pistol is a great defensive tool, but it lacks the firepower of its shouldered cousins and when they are in your house, where your loved ones may be, and you can carry larger arms, you can and should use something with more power. Why not a rifle? Rifle bullets have more penetration and are more likely to go through a wall and hit your neighbor or even one of your own children. Shotguns, however, have a great deal of power and a much smaller chance of over-penetrating.
Now, that's not to say other guns are useless for home defense. Many people, yours truly included, still keep a pistol by the bedside for immediate use if necessary. That's probably a bit more paranoid than most people are prepared to be, but I have my reasons. The wifey also has a few handguns secreted about the house in various places that are both difficult/impossible for kids to reach yet easily accessible by us. You can't expect to be in bed when your house is broken into. The fake SWAT team tactic is used both in light and dark and you would NOT want to be unarmed when dealing with them. Also, some people, not including me, are paranoid enough to keep rifles around the house in case they have to fight off body armored attackers. If you want to do this, ask for some advice from someone else. Unless there's some kind of disaster/breakdown of law and order, it seems excessive to me.
So, what kind of shotgun should you have?
Kind of a tough one to answer. In general, a combination of big enough to be an effective stopper, but small enough you can shoot it often to gain familiarity and competence. Reliability, ergonomics, and ammo capacity are also important, but must be balanced against your price range. If you've been trained to/know how to use a weapon mounted light, you might want one of those, if you have no idea then it's just a waste of money. Same with lasers. I would, however, recommend something other than most stock shotgun sights. Something you can use reliably in the dark. A cheap, but fairly good red-dot scope works. Something you can acquire a target quickly with.
As a starting point, I'm pretty fond of the Mossberg 500 series, particularly the 590, since that's the shotgun I used in the Navy. Also, the Remington 870 has served me well in a few tight spots and, although I've never fired one in anger, they have functioned well for me. Also, the various twelve gauge offering by Saiga seem awful nice, but I'll have to try some before I recommend them.
It shouldn't be your trap/skeet/bird hunting gun, nor should it have a rifled barrel. Not that you can't multi-role your gun, but it isn't ideal. It should be locked firmly in you mind that this shotgun is for a specific purpose. Hunting shotties tend to have longer barrels and this makes them less than ideal for fighting in close ranges. Especially since you should be loading with a nice buckshot load, the nastiest you can be comfortable with, which is why you don't want a rifled barrel.
Finally, no matter how ugly the gun turns out to be, and home defense shotties tend to be some of the most aesthetically insulting firearms around, you must drag it out to the range* and shoot it often. Preferably at pop-up targets and in assault courses designed to simulate defending a house (not SWAT style assaulting).
*If anyone at the range points out the aesthetic failing of your shotgun, telling them it's a home defense piece usually will shut them up.