The shaver sokets are powered by inverters whihc adjust the frequency to 50-60hz as many shavers rely on that frequency to work.
Plugging some power adapters into 400hz will damage them, but not the appliance as the output will have been rectified. I used to plug my laptop into the galley socket when positioning and accepted the fact I was going to have to replace it every year.
In a lot of aircraft the sockets for cleaning are powered by the ground service bus and are not energised in flight.