The <SD.h> library that comes with current IDEs only works with the hardware SPI pins.
The Shield uses pins 10, 11, 12, 13 for the microSD.
The SD will only work on a Uno (or a Teensy).
Over the years there have been several "hacks" for SD.h to run a Software SPI on 11, 12, 13 for a Mega or Due. e.g. change a macro value in a library file.
And several third party SdFat.h libraries that may or may not work with a Mega.
David.
showBMP_SD_as7.ino (10.2 KB)