I noticed an issue in the Reference section for ShiftOut:
// Do this for MSBFIRST serial
int data = 500;
// shift out highbyte
shiftOut(dataPin, clock, MSBFIRST, (data >> 8));
// shift out lowbyte
shiftOut(data, clock, MSBFIRST, data);
The latter shiftOut line should of course be:
shiftOut(dataPin, clock, MSBFIRST, data);