LCD keypad shield (dfrobot) doesn't work

I think that the LCD is defective.

I doubt it since you are getting the single row of blocks. This means that it internal routines have (incorrectly) initialized the controller and your program code, which would correctly initialize the controller, has not done it's job.

Don