By default, you need to press the shutter icon to capture images on HTC One M8, but you can also press the volume button or touch to capture as 2 easier alternatives.
To enable these 2 alternatives, do as follows:
1. Open Camera application
2. Tap the 3dot icon and then go to Camera Settings by tapping the Gear Icon
3. Scroll down and touch Volume button options and select "Capture"
4. Now, go to Camera options and make sure to mark the "Touch to capture" option
5. From now on, you can either touch the shutter icon, touch the screen, or press the volume button to take pictures