Vile (2011)

A group of attractive young people (of course) awaken to find themselves prisoners in a mysterious house with no means of escape. They are each outfitted with new accouterments–electronic devices attached to the base of their skulls–and a recording on a television screen alerts them of their task. In order to escape, they must hurt themselves and each other. The chemicals that the brain produces when in pain are collected by the devices, and when it collects a predetermined amount, the doors will be opened. Fail to do it in time, and everybody dies.