You must have an event item called "secret key". if you have that, go to galactic building in Eterna City. inside, go to the upper left corner and press "a", you will open a secret door... go inside it and you can change your rotom form there...
As Wobbuffet said, but if you are asking on HS, then in Silph co. in Saffron. Also, you don't need secret key but only bring Rotom there.
How to change your username
How to add a user avatar
Why was my post hidden?
The points system
Flags vs Downvotes
Type a Pokemon name, type, move or ability to see instant results.