I would only shoot when I know there's no chance of that (like hanging up in the hay loft looking down to rats on the ground; a miss or pass through would go into dirt; you only shoot when they're standing still, too fast otherwise).
Only a pellet rifle is feasible inside a house. Even when I shot rats inside with a pellet gun I had to block them in one room and wait until they poked their heads out from behind the fridge or something before I shot, because they were too fast running down the hall. That picture above of a...
If the little jerk is not afraid of you, a pellet gun will dispatch him easily. When I was a youngin with no sense I lived in a house with 15' rats (from head to tail) running through it. Shooting them with a pellet gun was great fun. (the house was cheap; what can I say?)