Shift in issues with 74HC165

Not sure i really understand your code example? does the 'do' section sit inside or outside the loop in my code?