Hi Fabre,
You’ll definitely want the sensor in the shade. If it’s exposed to the sun, it will report the temperature as being much higher than it actually is.
This thread has info on how to keep that from happening. The thread deals with humidity sensors, but the info is applcable to temperature sensors as well.