i agree that egg shells do seem to attract rats, so we put ours in the general rubbish bin.
At the moment we have 'moving' compost heaps, which are used to kill weed patches prior to re-seeding with grass, so a new position every year and after two years the compost is lifted. No sign of rats at all- not sure wether it's the addition of chicken poo or potash? I'd bet on the potash.