I agree with seeker....I do not reccomend any of the .22 ratshot shells (that I tried years ago). Two feet would be a maximum distance.
I too have had a rat problem in our barn for years (slop over from feeding our stock animals) Can't stand rats. They get into everything. My only options for getting rid of them over the years has been traps and shooting. We can't use poison because we have small dogs I fear might eat a poisoned rat they might find. Can't have a cat...wife and daughter highly allergic.
As far as shooting goes, the best, safest, most cost efficient method I have used is hunting them at night with laser sighted pellet rifle. I bait an area in the barn, under a light (I found that red light bulbs work best). Then I set a lawn chair up about 10 yards away from the bait. 10 yards is where I zero the laser sight. Just bait up before dark....then get set up in the lawn chair well after dark. Wait, watch. Don't shoot the first rat to come to the bait. Small ones usually come in first....big breeding aged ones then come in a whip the the crap out of the little ones. Bust the big ones first. Most will scatter after you shoot, but wait. One or two will usually be back in a bit. Rinse and repeat. You and your grandson could take turns with this set up. I've often killed 9-10 inside an hours time.
The advantage of the laser is that it allows minimal movement to take aim. I usually have the air rifle laying in my lap with the muzzle pointed toward the bait area. They never seem concerned about the laser dot bouncing around when you turn it on, but they will scatter if you pull up to aim with iron sights or scope. I think it actually blinds them when you lase thier eyes before the shot. The eye is a good target. Humane shots. The laser I use was from Walmart and it costs like $20.
I once had a BB bounce back on a miss once, so I always use pellets. Less bouncy.
I also have constructed "shooting galleries" in the past. Two sheets of plywood separated by 2x4's. It's like a squaty box with only one open side. These are mounted about eye level. A ramp to the open side or a hole in the top allow access to bait. Bait these regularly, but only kill in them occasionally. Often there will be three or four in these munching away. You can sneak up, throw a stout light on them and pop away through the open side. I average three out of four on these set ups.
Trapping has proven to work best. I've almost abandoned hunting them. Really big gopher rats often escape a large wooden base Victor rat trap. I use Victors in conjunction with #50 Connibear traps. Nothing survives a properly set Connibear. Make sure you don't have pets that can access these. My workshop is in the barn, so I do all my trapping in there. I also use small live traps at certain times. You just have to dispatch them in the cage. Often, it is hard to kill them in a cage with one clean, humane shot. I have found that a dunk in the horse trough is often a faster end, more humane. They go quick that way.
One note on trap sets. On the Connibears and live traps I use bait balls made of old panty hose filled with grain/peanut butter/banana. Tie the bait sacks to the triggers on the traps. They really have to work the bait in the little sacks.
An alternative shooting method would be with costlier night vision stuff. Go on Youtube and find videos by a Brittish lady named Snypercat. She cobbled together a fairly inexpensive night vision set up of pest control in her barn. She uses a Sony Handycam attached to a regular scoped air rifle. Rather ingenius rig she made. She cleans house with that thing. I am currently trying to find the stuff for a rig like hers.
Sorry for the long post, but rats can be get to be a really expensive problem if they get out of hand. Just passing on my experiences to help.