This relative of the deadly nightshade is a poisonous plant, and is found occasionally in many Mediterranean countries.

Apple of Sodom, a member of the nightshade family, Solaneaceae, has attractive flowers but also vicious thorns. In this picture, taken in March in the Algarve region of Southern Portugal, the previous year's fruits can be seen ripening while the new season's flowers are attracting insect pollinators.
The fruits, typically 3cm to 5cm across and looking very much like unripe tomatoes, appear in late summer; they turn gradually from green to bright yellow and eventually black. The fruits should not be eaten.