Just like with other flagships that have been turned into Google Play Editions, the HTC One M8 can now be turned into a Google Play Edition device. Which is great news for those looking to, or have, bought the HTC One M8 on contract through their carrier. It's also great for those outside of the US who don't get Google Play Edition devices but still want pure Android on the beautiful hardware that is the HTC One M8. Now that the HTC One M8 has S-Off, and Root, it's now very simple to get stock Android on the HTC One M8. Even though, I'm a big fan of Sense 6, it's still great to have options.
It's important to note, that at the time of writing this post only the GSM variants of the HTC One M8 work with this. So if you have a Verizon or Sprint version, it's not going to work unfortunately. At least not yet. You are also going to need S-Off or know how to use Fastboot and ADB. Additionally, you'll want to be sure your CID matches up, so you don't brick your device. Here are the commands you'll need to use:
adb reboot bootloader
fastboot oem rebootRUU
fastboot flash zip RUU-HTC_One_M8_GE-4.4-3.62.1700.16.zip
You will get an error reading: FAILED (remote: 90 hboot pre-update! please flush image again immediately)
fastboot flash zip RUU-HTC_One_M8_GE-1.16.1700.16.zip (yes, again)
If you have questions or are looking for more help, you can head over to XDA and get some help over there, which the thread is listed below in the sources. Obviously, this may or may not work for everyone, and you may not get the results you wanted. But that's kind of expected when you're flashing unofficial software onto a device. So be careful and make sure you read everything a couple of times before attempting to do it yourself.