Continuous Shooting mode is enabled by default on HTC One M8 and it takes up to 20 shots (20 frames is the default limitation which can be changed) as you press the shutter button. To disable and turn off continuous shooting on HTC One M8, do as follows:
1. Open Camera application
2. Tap the 3dot icon, followed by the Gear icon.
3. Scroll down and touch Continuous Shooting and make sure to unmark it