Why won't it run over 5 minutes?
2 Answers
Something is going into thermal breakdown. This can be very difficult to find. Most common are crankshaft position and camshaft position sensors, but there could be other problems like the ECM itself. Your best bet is to have your favorite independent shop have a look at. Who knows they may find right off doing a live data scan.
Three to five minutes is enough time for the engine to reach operational temperature. If you have a cooling problem, as the radiator is empty or the water pump is defective, that's also enough time for the engine to overheat and stall. That's also enough time for a bad alternator to stop powering the engine. There are a hundred other reason for what you're experiencing. Have a mechanic who can actually see the car evaluate this for you.