Excalbians

Star Trek: The Original Series
Episode: TOS 077 - Savage Curtain

Planet: Excalbia. Sentient rock creatures whose planet is normally a bed of molten lava and deadly to humans. The Excalbians are capable of shape-shifting, and use this ability to experiment on the social practices and belief systems of passing alien life-forms.