On the HTC One M8, you can easily disable and turn off shutter sound to take picture quietly. To turn off shutter sound, open the Camera application and do as follows:
1. Tap the 3dot icon and then touch the Gear icon to go to Camera's settings
2. Scroll down and touch Camera options.
3. Make sure to unmark the Shutter Sound option