A juvenile I presume? It had been living in an empty shell.
Porcelain crabs are decapod crustaceans in the widespread family Porcellanidae, which superficially resemble true crabs. They are typically less than 15 mm (0.6 in) wide, and have flattened bodies as an adaptation for living in rock crevices. They are delicate, readily losing limbs when attacked, and use their large claws for maintaining territories.