Arduino as SPI Master and Slave Demo Code

MahtaE:
Hi all, is there any way to use the ShiftIn command for using Arduino as the SPI slave?

No. ShiftIn() is a function that performs a software implementation (bit-banging) of a master device acting to shift data in on a pin. It generates the clock signal, and samples the input pin for the data.

Any slave implementation requires that the master generates the clock (and the slave select signal) while the slave listens for the select and shifts data out according to the clock signal.

Being an SPI master is easy, being the slave is a lot more complicated (hence the basis of the discussion here, if it were simple like using ShiftIn(), there wouldn't be this thread.)