Car enter Problem

My car starts and runs normally when I enter it, but as soon as I close the door, the engine stops immediately. What could be causing this problem, and what should I do