I would think a shotgun.
Short-range and wide-angle. That way the projectiles don't exit the home and potentially end up in a bystander... and there is no real need to aim if something happens at night, with the lights off. Point vaguely in the right direction and boom, problem solved.
It's why the Navy uses them if hostile intruders come aboard a ship.
Well, to be honest, um....
REALLY honest, the main reason that the Navy uses shotties as a primary anti-intruder weapon is that sailors aren't all that proficient with firearms. "Practice" is usually done over the side at a very large object with LOTS of harmless water around it.
Now, the guys in my units were different (i.e. marksmen), but the average
shipboard sailor (where I originally started out), well, you just don't want them firing supersonic rifle rounds in full auto mode around steel and ballistic aluminum structures. The blowback from that kind of thing sucks, even if they manage to hit the target.
Roving patrols with shotties and a .45 were enough excitement, and with a heavily armed and trained reserved force, backing them up, it was enough.