Its my first thread HOW TO ROOT so m not resposible if u brick your phone however here's the link to stock roms if in case ur phone gets bricked.!!
First of all you have to unlock bootloader and install cwm recovery on your phone, here's the tutorial:
Step 1 – Bootloader Unlock
Go to htcdev.com then create an account there and click on Unlock Bootloader. Choose “All Other Supported Models” and click on begin bootloader unlock at the place. You will not void your all warranty but only HTC will not cover the problems which are caused due to software problems so accept the agreement.
To enter bootloader mode, make sure the phone is switched off. Remove the battery if it is not getting switched off. Then hold Volume Down and start pressing the Power button without any USB cable. Use the volume up and volume down buttons to select “Fastboot” and select it using the Power button. Now connect your USB cable and continue following the HTC instructions.
You need the zip file which you must have downloaded from the above link. You also need HTC USB Drivers installed to connect it with you device. Using the command prompt you can simply navigate to the extracted files and run the fastboot command. (Use the command “cd C:/myextractedzip” to change to a directory).
Save the Unlock_Code.bin attachment which you get from HTC by Email into the same extracted zip folder and run the next command. You now have an unlocked bootloader and the phone will start up and an HTC wizard.
Congratulations ! Your bootloader is now unlocked.
Step 2 – Flash ClockWorkMod Recovery
Remove the USB Cable if connected and boot again into bootloader mode. Click fastboot and reconnect it to your PC. Now run the following command on your PC via fastboot :- fastboot flash recovery recovery.img
Switch off your phone now again and make sure that the USB Cable is also removed from your computer.