Excerpted from How Do I Do That In Photoshop by Scott Kelby

With your image opened in Camera Raw, you can easily get rid of this keystoning effect. Click on the Lens Corrections icon (it’s the sixth one from the left) under the histogram, click on the Manual tab, and then click-and-drag the Vertical slider to the left until the building looks straight (it stops looking like it’s leaning). There’s an automated method, too: click on the Profile tab, and turn on the Enable Lens Profile Corrections checkbox (as seen in the inset. Your lens make and model should appear in the pop-up menus below. If it doesn’t, just choose it yourself). Next, click on the Manual tab, and in the Upright section, first click on the Auto (A) icon and see how that looks. Chances are it fixed the leaning back problem. If it didn’t, then click on the Vertical icon (the second one from the right). If neither of these did the trick, click on the Off icon, then use the Vertical slider below to do it manually, like I mentioned at the beginning of this tip.