Many South African (and other) euphorbias make it into gardens of the world. There are worldwide more than 2000 species to choose from in this genus. Often succulent, sometimes tree-sized, many of them spiny and usually containing milky latex or sap, they do well in climates where “softer” plants do not cope. Euphorbias tend to take temperature extremes, arid conditions and poor soil in their stride.
One of the first Euphorbia species that comes to mind in general gardening conditions is, of course, the poinsettia, Euphorbia pulcherrima, originally from Mexico. The southern parts of the USA have the climate and local species options with their spectacular colourful bracts that can shape outstanding garden effects. Australia has similar horticultural trends (Wikipedia).
But in South Africa there are many people with green fingers who would not associate those vivid favourites with the Euphorbia species we know here. Exotic euphorbias blend well in our gardens and planting indigenous doesn't have to be a rigid habit. It is likely the rigid, spiny shrubs or finger cushion stem succulents that receive consideration locally for key positions on creative rockery designs. Sometimes with colourful and shapely mates from Africa and elsewhere.
E. pentagona is just such a plant that will add height, a striking appearance and low maintenance requirements of fending for itself in the garden without pampering. Good drainage is more important to it than good soil. It will grow from offsets that are readily found at the base of healthy plants. And putting it in a container in full sun will not be a problem (Wikipedia; www.davesgarden.com).