Turn off the power, swap the old shaver socket for a new one, and test it works safely.
Bathrooms count as a 'special location' under the Wiring Regulations. A BS 3535 shaver socket with an isolating transformer is the only type of general-purpose socket normally allowed in most bathroom zones. Swapping one for another like-for-like isn't notifiable work under Part P because you're not adding a new circuit - but if you're not confident wiring it safely, get a registered electrician to check it.
Before you start: Which electrical jobs can I do myself? Part P explained
Travis Perkins and Tooled Up links are affiliate links: if you buy after clicking, we may earn a small commission at no extra cost to you. B&Q and Amazon links are plain searches and earn us nothing.
Save this as a project