Famvir is used to treat viral infections such as genital herpes (a sexually transmitted infection) and herpes zoster (shingles). It is also useful in preventing genital herpes and in preventing viral infections occurring in those with a lowered immune system.