HTC One M8 users are in for a pleasant treat, as it is now possible to upgrade your handset from stock version to Google Play Edition without the risk of introducing bloatware or junky apps into the mix, which is usually the case with most custom ROMs.
In addition, Google Play Edition brings all the latest updates and bug-fixes for your handset while retaining the stock interface and features to offer a completely pure Android experience like in Nexus devices.
Note: You will be unable to install Sense based ROMs after installing the GPE upgrade due to the partition variation between the GPE and standard Android version.
The instructions provided in this guide are limited to HTC One M8 GSM devices and will not work with any other model. Verify your device model from Settings > About Phone.
Ensure your phone has at least 60% battery charge to avoid inadvertent shutdown during the installation process.
Verify that the phone is in S-OFF mode.
Make sure the correct USB drivers (download here or click here for Windows 8 drivers) are installed for the phone on computer.
Now you need to setup ADB and Fastboot on your computer or download the Minimal Fastboot/ADB tool and unzip it: mfastboot-v2.zip.
For instance, your CID should be GOOGL001 (GPE CID for the HTC One M8) if you want to get OTA updates from Google.
Those who are unaware about the procedure for changing CID and MID can follow the tutorial here (courtesy of Droid Views).
Launch command prompt in Fastboot folder by right clicking in the folder's empty space while holding Shift key.
Connect your device to the computer via USB cable and reboot the device into boot loader by typing the following at the command prompt.
Once your phone reboots, it should be running the new android GPE for HTC One M8.