My personal favorite is a 10mm. It's a hyrbrid between a .45 stopping power and penetration of a 9mm. They aren't common, and ammo isn't as cheap as a 9mm, but it does the intended job well.
.22s are fine for shooting paper targets, but if you want something that works well for both, get a larger caliber. That way when you shoot you are actually get used to the recoil and how it feels. So if you ever do have to use it at home, you'll know how it feels and how to aim it best.
Though for home defense there is nothing really better than a pump shotgun. If you are worried about actually hurting someone, get some shells just loaded with the wads and no buckshot, and make sure the first round is always the blank. Just the sound of someone chambering a round makes the average burglar quite scare! Plus if you do fire one off inside you won't do much damage. And the second (and third) can be real buckshot just in case.