Input problems with 74HC595

Hard to tell from the photos but have you put a signal to all the ic inputs, especially the reset? If they are not connected to 5v or gnd you can get strange effects from the floating inputs.

Just realized you are trying to use the 595 as an input device. The example uses a different chip. The 595 is for output only. You should get into the habit of reading the datasheets for the devices you use as these will spell out the capabilities.