Arduino mega 2560 how to connect to the ethernet shield.

The ICSP header is how the SPI bus gets to the shield. If you can ping it, the ip is being set. That means the SPI bus is working. As to why no other sketch code works...??

I have a non-R3 Mega and ethernet shield, both official Arduino products. They are very similar to the R3 except for the 2 pins on each side. They work great together.

I wouldn't take that as an R3 shield, but then I am a bit picky. If one major component is installed incorrectly, what can you expect from the rest of it?

You might want to check the w5100 IC pin connections to the board. There have been cases of solder bridges on some of the non-Arduino products.

edit: Here is some pics of the solder bridges:

Just my opinion.