Rats are attracted to the smell of fresh eggshells, so I've never put them in the compost.
But 'seasoned' (ie well-dried) shells are much more useful than being mixed into a compost heap, for me. I use a lot of eggs and have a large pot which I keep on top of the combi-boiler into which they go throughout the year. As they dry out I crumble them down. Come spring, when I start planting out, I've a good quantity which I use as a top mulch round tender plants against slug damage and sometimes, too, put a handful in the planting hole to (hopefully) deter the underground slugs. They really, really, don't like the sharp surfaces.
Has worked for me.