A few things that haven’t come up yet:
Always yell at the intruder. Tell him he’s in the wrong house, that you have a gun, and that the cops are coming (even if this is a lie). If you approach him, leave him an exit route.
Giving him a chance to leave peacefully (and good reasons to do so) can save you the hassle of shooting him, will look good if it comes up in the trial, and will reduce your risk of shooting a harmless drunk who honestly thinks this is HIS place.
If he comes at you violently after you’ve said this, well, he must be dangerous, and you have improved your case for shooting him.
Even the Army says “Halt, who goes there?”, rather than just opening fire. 
As Beagle mentions, if the guy gets in your house at all, you’ve already screwed up. Most of the criminals don’t want to work hard at this, and will move along to another house if yours seems too secure or contains too many big dogs.
Even most genuine criminals will not need to be shot. They’re not in this business to get hurt! If you let them know you’re not an easy target, most of them will be willing to go elsewhere.
This is why “any gun is better than no gun”. The important thing is that YOU give the impression of being willing and able to shoot him.
I’m actually more scared of the punk’s lawyer, if the whole business ends up in court later, than I am of the punk himself. So I attempt to “prejudice the jury” in my favor as much as I can:
Personally, I avoid guns that look like something an action hero would carry. No weird black weapons with odd-looking projections on them, no laser sights, etc. When the police and the jury look at my old slightly-scuffed double-barrel (not even sawed-off) they will think “Grandpa’s duck-huntin’ gun” NOT “Soldier of Fortune Kill-Master 3000”.
I’m with the birdshot contingent. Not only for the previously-mentioned reasons, but also because it sounds more innocuous to a jury. “Look at these tiny little pellets! Does this look like the ammo of a guy who wants to hurt people? He just used what he had left over from skeet-shooting!”
My pistol is an old Colt police revolver, .357 Magnum loaded with .38’s. Again, not the choice of a “homicidal gun-nut”, just something the good guys used to carry back in the old days. And my lawyer can always say “Hey, he COULD have used Magnums, but he CHOSE not to! Does this sound like a dangerous guy to you?”
You never know… any of these impressions, in the right mind at the right time, might just make the difference that keeps me out of jail.