Runs and shuts off

Check to see if the engine compartment is hotter than usual, if it is maybe a broken exhaust manifold, rusted exhaust pipe or clogged cat may be the cause, if the compartment heat's up, that could cause the ECU to malfunction, check the ECU right after the car shuts off to see if it's abnormally hot. hope it helps.