Pull the battery out.
If you don't have a removable battery, press the power button and keep it pressed until the phone shuts down. May take 10-20 seconds. With some phones you should do this in a brightly-lit environment - some use the light sensor to check that the button is not being pressed while in a pocket, in which case this shutdown method will not work if it is too dark.