Another disadvantage of the shotgun is that it is a two-hand weapon. With a handgun, you can use your other hand to hold a flashlight or phone, open doors, drag little kids out of the way, and do other useful things while still maintaining your gun ready for instant use.
Think twice about putting a flashlight attachment on your shotgun. Yes, it's convenient, and allows you to keep both hands on your gun. But it also means that your muzzle is pointing at whatever you're illuminating, whether you'd like to or not.
Unless you live in a cave, very few houses are completely dark, even on moonless nights. Nightlights, digital alarm clocks, and the like tend to provide at least *some* illumination.
The home defender has another distinct advantage over the home invader - the defender is intimately familiar with the layout of the house. Example: home defender knows he should be able to see the glow from the digital microwave clock in the kitchen from his current location, say, in the hallway. If he can't see the glow, he knows where to look to detect the target. That kind of intimated, detailed knowledge goes a long way to detecting and isolating the threat, and then removing it.
Some basic low-light shooting practice doesn't hurt either.