By code apartments are constructed with a firewall between units (basically double thickness of sheetrock on both sides) and you are unlikely to pass through it with any buckshot.
If you are hoping to defend your domicile with a short fight and as few shots as necessary, a shotgun is hard to beat. You do not need to be a great shot. you just need to be familiar with the weapon and it's pattern. Heck, just racking the round in is usually enough to send bad people back the direction they came from.