Problem with shift register
You cannot directly give an index (0..7) to a shift register if you want the index to represent the LED number to be switched on.
You have to build a table similar to the following:

byte led[8] = {
0b00000001,
0b00000010,
0b00000100,
0b00001000,
0b00010000,
0b00100000,
0b01000000,
0b10000000
};


and later . . .

shiftOut(dataPin, clockPin, LSBFIRST, led[leds]);


where leds is a number 0..7