Generally your medical professional (doctor, pharmacist etc) will instruct you how to use Rectogesic. In case they haven’t, the basic idea is that you squeeze out 1-1.5cm onto your index finger, then apply to the inside of your anal passage. The sweet spot is about 1-3cm up there.
It’s not pleasant. Wash your hands afterwards, even if you use saran wrap or a disposable finger protector.
(for the Americans and anyone else who uses inches instead of centimeters, there’s a small ruler on the back of the tube and also on the box which shows you how much 1-1.5cm is)
More information here (external site).