1999 Pontiac Grand Am

Recently my 1999 Pontiac Grand Am has been shutting off while driving. This started last Saturday and has been off and on since then. Before the car shuts off it starts to shake and then it cuts off and then all the lights in the dash come on with the oil can light and battery light staying on for a second or two after the others have went off. After putting the car in park then turning the car off and on again the car is fine. I'm thinking its just time for me to have my oil changed since its almost time for it to be changed or it could be the battery. I pray its not anything serious. Any thoughts?
November 15, 2013.

When the engine stalls, it is normal for the lights to come on in the vehicle. Is the check engine light staying on when the engine is running?