All I have ever fired is a long range rifle...only good for hunting and military combat. So I will defer to your knowledge of shot guns. But I keep reading how the buckshot from a shotgun does not need accurate aiming.
Even more important than a gun in the house is a good dog who barks loudly at any strange noise. That gives you heads up time to get out of bed and get the gun ready. Last thing I would want is to be surprised by an intruder, especially if I was a lone female in the house.
Pretty much much comes down to the same thing: at short range, the shotgun is essentially a rifle, but a devastating one, unlike a .223 round that might well just zip on through and not hit anything vital. You have to aim. And that barrel is an excellent handle if the bad guy gets too close.