You're talking about Installer, not the AppStore. Installer comes from jailbreaking. AppStore is the official application distributor coming from Apple with the 2.0 Firmware in June.
As to fixing it. If you're using a Mac, download iDemocracy. Go into the Modify tab at the top, and the Extras tab at the bottom. In the dropdown menu, select fix Installer, make sure your iPhone is plugged in, and click Go.