I'm not shy about the fact that I prefer a carbine like an AR15 for most all around combat fighting. That said, the shotgun has long been a mainstay in close quarters battle, and for good reason.
Shot for shot at close range, no common hand held weapon has the stopping power and does the same damage as a shotgun loaded with buckshot. When you consider that each pull of the trigger releases essentially 9 pellets of 00 Buck, with the equivalent power of something close to a .32ACP for each pellet, in a close pattern, you can see how that concentrated power can be quite devastating.
A common combat shotgun may have 6+1 shells. That, times 9 pellets each is 63. That is a whole lot of firepower to wield.
During WWI, "trench guns" were used with extreme effectiveness against German troops, so much so that the German government lobbied to have it banned from warfare, citing the same text that is used to prohibit JHP's from warfare, "It is especially forbidden to employ arms, projections, or materials calculated to cause unnecessary suffering."
When it's petitions were rejected the German army even went so far as to threaten extreme punishments to troops captured while using shotguns. This may help you understand why the shotgun is such an intimidating weapon.
Another factor to consider is price. I bought my own personal Remington 870 Express with a 2 shot extension for under $400. When you are thinking about affordable home protection, you'll see that it's hard to beat that.
I caution inexperienced shooters to avoid pistol grip shotguns that lack a buttstock. Shooting a shotgun from the hip is cool in Hollywood but it's not practical in reality in most cases. Shooting a shotgun from the shoulder with proper aim will be devastating to an attacker.
Like any long gun, a quality sling is essential.
A quality side saddle shell holder, or a speedfeed stock could be a very good add-on as well. As is a light.
A basic pump shotgun like the 870 Express or a Mossberg 500 is not only affordable, but they are easy to operate and very reliable.
However, just because you have a weapon does not necessarily mean that you are well armed. So, don't forget to get out and get some range time and plenty of exposure with the weapon.