74HC595 not working.....?

I wired up a 74HC595 to my Uno and some LEDs. Loaded and ran your code and the code works without modification (except cleaning up the end where it got posted funny). I had to set the line endings in the serial monitor to none to prevent the sending of the carriage return/line feed into the serial buffer. If they are there they are interpreted as numbers (which become negative when 48 is subtracted) and shifted out (bad). Type 1 and enter and the second (since they are numbered from 0) LED lights, type 5 and the 6th lights.

So it's not the code. Double check wiring and polarities. Make sure oe* is grounded and MR* is at Vcc. And if there is really a cap on the latch input of the 595 remove it.