IMO, most shooting in a home invasion or burglary situation is done at 10 feet or less.
That's true though ideally the intruder won't be able to get that close before you have to shoot. It is best to use what you feel comfortable with. A friend of mine had to shoot someone that tried to rob him and a friend of his. He was waiting in the truck while his buddy went inside a store to buy something. Well the store couldn't break a hundred so he came back outside and my buddy seen some guy follow him out. So he got his pistol and laid it in his lap. The guy walked up and stuck the gun through the window and tried to rob them. When he stuck the gun inside my buddy shot him in the chest. At really close range a pistol is easier though if the range is a little farther a shotgun is easier to hit with. I wouldn't want either one pulled on me. I had a little .25 auto stuck inmy face before and no matter how small the gun is it looks really big when you look down the barrel of it.