2005 mercury sable stalls out while driving

About two weeks ago, my mercury sable started to stall out while I was driving it. The rpm dropped to zero unless I kept my foot on the gas and now it does it every time I drive it. At first I thought it might be due to overheating, but it does it on start up before even being put into gear. I can usually get it to drive nicely after a few miles, but I always worry about putting on the breaks and having it stall out again.

I ended up bringing the car to autozone since the check engine light came on and the codes 1633 and another one I can’t recall came up. The clerk suggested we replace the idle air valve since it looked like it could be an issue, so we did. They also suggested we replace the battery, but we just put in a new battery last year along with a new starter so I’m reluctant to do so. The last thing they mentioned was that there could be a short. Honestly I can’t afford to bring the car back to the mechanic at this point in time for an electrical issue so I though I’d be able to put some of my knowledge of cars to use, but at this point I’m not sure whether to check the battery, alternator, or go over the wiring with a fine tooth comb or if I should be looking at another part of the system. Also, if this means anything to anyone, the clerk cleared the code after reading it, but the check engine light came on not even a minute down the road.

Try checking this.