SN74HC595 is a great way to extending your Arduino devices.   This is SIPO:  Serial In Parallel Out.    What does that mean?  You can connect 3 wires back to your Arduino device and get 8 outputs.   You can even daisy chain them together to expand from 8 to 16, 24, 32 outputs.   The benefit of shift registers is you can expand your devices to more input and output ports.   I will be discussing SN74HC165 PISO Parallel In Serial Out chip for dip switches to control the 8 LEDs.  

Here is how I used one for LEDs.  The yellow wires go out to 8 LEDs.
pin 15: QA : 1st LED
pin 1: QB: 2nd LED
pin 2: QC: 3rd LED
pin 3: QD: 4th LED
pin 4: QE: 5th LED
pin 5: QF: 6th LED
pin 6: QG: 7th LED
pin 7: QH: 8th LED
pin 9: cascades several chips together

pin 16: VCC: 5V rail
pin 8: GND: Ground
pin 14: SER:  Serial Input for data: black wire
int dataPin=12;

pin 13: OE: Output Enable is pulled to low or ground so you can write to the device

pin 12: RCLK:  Is the latch pin: white wire
int latchPin=11;

pin 11: SRCLK: Is the clock pin: blue wire
int clockPin=9;

pin 10: SRCLR: direct overriding clear
I pulled it to high or 5V

SN74HC595 data sheet