I think you can defend yourself well with either one. I would choose the pistol because you don't have to load after every round fired. Modern self defense ammo in 9mm is more than adequate to do the job.
But, if you like the shotgun here is an interesting video clip about deploying it. Advance to 1:45 in the video (or watch the whole thing, its three minutes long).
Defensive Shotgun with Clint Smith