The engine could be running rough for several reasons. If possible, run computer codes to see if a problem show up. Check the spark plugs for consistent color and wear. If one looks different then there is a problem with the system for that cylinder.
Could be a vacuum leak
bad booster pump or air in brake lines
cause it's junk
Several things can cause your car to stall and shake when you stop. Replacing the spark plugs and spark plug wires may cure the problem.
if it is automatic then this would be caused by shift down is not working in transmission
Travelling to slow in a high gear, so clutch in and lower the gear.
torque converter or solenoid problem most likely if it runs out of gear ok.
An engine usually has a higher idle speed when the ac is running. If the high speed idle does not operate then the ac will cause the engine to stall.
It could be any number of problems, if your check engine light is on that should give you a clue as to what's going on. If not I would start with a tune-up. New plugs, wires, cap & router (if applicable), and Air filter.fuel injector(s) failing or clogged, failing fuel pump, clogged fuel filter, engine timing, vacuum leak are other places to check. its not a complete list but a place to start
Perhaps a vacuum leak or bad vacuum check valve in power brake booster
It means the engine stopped running.
AC runs on the battery. If the car is off and you run the AC, then start the car, it will stall.