Avoiding all sexual activity is the only absolute way to prevent a sexually transmitted disease such as granuloma inguinale. However, safer sex behaviors may reduce your risk.
The proper use of condoms, either the male or female type, greatly decreases the risk of catching a sexually transmitted disease. You need to wear the condom from the beginning to the end of each sexual activity.
Ballard RC. Calymmatobacterium granulomatis (Donovanosis, Granuloma Inguinale). In: Mandell GL, Bennett JE, Dolin R, eds. Principles and Practice of Infectious Diseases. 6th ed. Philadelphia, Pa: Elsevier Churchill Livingstone; 2005:chap 233.
Eckert LO, Lentz GM. Infections of the lower genital tract: vulva, vagina, cervix, toxic shock syndrome, HIV infections. In: Katz VL, Lentz GM, Lobo RA, Gershenson DM, eds. Comprehensive Gynecology. 5th ed. Philadelphia, Pa: Mosby Elsevier; 2007:chap 22.
Centers for Disease Control and Prevention, Workowski KA, Berman SM. Diseases characterized by genital ulcers. Sexually transmitted diseases treatment guidelines 2006. MMWR Morb Mortal Wkly Rep. 2006 Aug 4;55(RR-11):14-30.