A rat can get into ANY coop and if it were the chickens, that shell would not be left there. This is a time of year many people report egg loss and the culprit is usually rats...if they can't cart them away and store them, they will eat a hole in them and lick out the contents.
I learned that the hard way some years back when eggs just kept disappearing, then I'd find one like the one in your basket or one with just a hole out of the end and the contents missing..but a little bit of JustOneBite took care of it and each fall I'd repeat that and, sure enough, I'd get me some rats crawling out and dying. A brown, fuzzy rat...cute as can be, but not so cute that I'd share eggs with them.
You don't have to put the poison in the coop...the rats are not living in the coop. If you have adjacent buildings you can close up so pets cannot enter, that's a good place to place poison. Some people build contraptions to place poison in to keep it safe but still rat available...like making a "T" out of PVC pipe and placing the poison in the T.
JustOneBite is a poison cake that has scored sections that break off into bars..they have to gnaw on the bars to get some off to store it and they will die in a couple of day's time.
Not unless it's in a container the rat can enter and the chickens cannot..that's pretty simple, though. A sturdy cardboard box upturned and with a rat sized hole along the bottom, with a weight on top, should suffice. Turn the side with the hole towards the wall for even more insurance against chickens getting to the poison and just leave a gap big enough for the rat to slide back there and enter the box.
You don't want the poison anywhere that the crumbs falling off the bar as the rats nibble can possibly be reached by the birds. I'd leave it there for the winter, if you have the room, and just keep checking to see if it needs replenished.
Chicken coops are a favorite feeding ground for rats and most farms will have a plenty coming after feed grains. When they get real comfortable, they make daytime appearances to snatch eggs, particularly when there are no humans around the coop for most of the day.