HTC One M7 Stock ROM Installation
OK so I have a One m8 but I think the process should be about the same. You'll want to find the right RUU for your model. I'm not certain which model/carrier you have so here is an overview list: http://forum.xda-developers.com/showthread.php?t=2428276. 

To relock your bootloader (necessary for RUU), make sure you have adb installed, connect your phone to your PC. Then type the following commands:

adb devices
adb shell
su
echo -ne ‘\x00\x00\x00\x00’ | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796
exit
exit
adb reboot bootloader


When that is done, simply run the RUU exe that you downloaded from the first link. If you found the right one, it should restore your phone completely to stock.