I recently got a Mossberg 500 pump shotgun with a pistol grip. Holds 6+1 shells. Ugly looking, but compact and gets the job done. The gun shop owner who sold it to me made the same comment as a previous poster about the sound of the action being an unmistakable deterrent. A nervous voice saying, "I have a gun!" doesn't cut it. Also, you can load it with ammo that will take out a person on the other side of the room but will not go through a wall with force enough to hurt an unintended person seriously.
I'm currently looking for a long gun to polish my marksmanship. 9mm semiauto looks like the right choice for me. Again, I don't want the bullet to carry too far for safety reasons. Another consideration is that my spouse needs to be able to fire the weapon with confidence, and 9mm doesn't kick back very hard. The ammo is also reasonably priced.
But in the end, you have to go with what is confortable for you. Is there any way you can try it on a range before buying, or get a trade-in guarantee if you don't like it?
P.S. It's pretty difficult to get a pistol permit where I live.
The eternal debate, shotgun or handgun? Buy both, don't be cheap about it. Remember it's your life versus theirs. Two hundred bucks more is well worth it, get the Smith and Wesson 38 special. The Mossberg 500 shotgun would also be fine.