Any error codes/check engine light? If the engine does not idle, check for vacuum leaks and remove/check/clean the IAC (underside of the throttle body).
It might also be a good idea to clean the throttle body and air passages, and check the TPS voltage at the closed throttle position.
Once that is done, if conditions do not improve, check fuel pressure and injector leakage (fuel pressure drop at shutdown). Don't forget the cold start injector.