LCD shield problem

I think the comment below might be a good clue.

// if analog input pin 0 is unconnected, random analog
// noise will cause the call to randomSeed() to generate
// different seed numbers each time the sketch runs.
// randomSeed() will then shuffle the random function.

The shields I have used have Analog pin 0 used to get the keyboard input. Check your shield schematic, if your shield is connected this way, this method of getting a random seed won't work.

While you're checking the schematic, also make sure that pin 7 is not used by the shield. If it is, you may never be getting the initialization signal.