Before I start, I'll say that there are as many different dog training methods as there are dog trainers in the world. There's no absolute right away to do anything, it all depends on who you ask, and what they've had the most success doing. I'm sure people will disagree with my methods, and I'll disagree with theirs, which is why I haven't read any of the posts before mine here and will not read any posts after mine, to avoid this turning into a flame war. All I can do is give you one of many views, and hope you find something that works for you and your cute little guy, whether it's my method or not.
I'll also point out that from the picture you posted, he definitely could have some Terrier mixed into him. Although I'm sure you had no intentions to, I want to stress that this means that this is likely a dog that can never, ever be trusted around your rats, no matter how well he seems to get along with them in the future. All it takes is one of them moving in such a way as to set his instincts off, and they'll be gone. So please, take extra care to make sure that he's never anywhere where he could potentially get to your rats. This includes being able to nip at feet and tails that may be hanging outside the bars of their cage.
In regards to the barking - the big point I want to make is that a correction after the dog has already barked, is useless. You need to correct the dog BEFORE he barks. By watching him, you can become familiar with his body language and be able to anticipate a bark before it happens. I prefer to correct with a Martingale collar - done properly, it's the most safe and humane way to correct a dog. It causes them no pain, it simply delivers the message that whatever they're doing (in this case, preparing to bark) is unacceptable. On the other hand, you should praise them when he is able to sit comfortably within the same distance of the rats without barking. (Most people will recommend food rewards, but I entirely disagree and feel that physical praise is not only more effective, but helps build a stronger bond between you and the dog without turning to bribery.) Be careful not to switch back and forth between correcting and rewarding over and over, it can be very confusing. If you need to correct, then stick to correcting for that session. This should all be done on-leash and for prescribed periods of time - when you're not training with him, don't allow him into the room with the rats.
I would also recommend, if you expect this dog to be staying with you for any length of time, to set up a barrier around the rat cage that he cannot cross. Not a physical barrier like a baby gate; an imaginary line that he cannot cross, or even an actual line drawn out in duct tape. If he attempts to walk past this line, correct him. If you can him already past this line, yank him out. You do not want to hurt him, obvious, but you want it to be jarring enough that it sticks out in his mind - enough that he stumbles a bit on his feet. Same thing, reward him when he's around the line without crossing over it, and don't switch back and forth a lot between correcting and rewarding.
Crate training is also something you should strongly consider. I think it would help greatly with managing this dog, and would be a great plus to his getting adopted. Most educated dog parents would love to adopt a dog who has already been crate trained.
That's about all I can think of for now. I hope I've been somewhat helpful. If you have any questions, please, feel free to shoot me a PM.