AIN'T got your backs to wall, in extreme opposite corners, either. So the distance from the muzzle of the longarm will be 3-6 FEET, at which range the shotgun pattern will be at MOST 2" wide, and probably only 1". LOT of help at hitting a man, right?
even in hallways, 20 ft from the muzzle will be a VERY unusual range inside the home. The longarm presents a TEMPTING "grab target" for the attacker, and is a lot harder to keep "on" a man, while you use a phone, etc. The pistol is the FAR better choice, if it's loaded properly.