Proper Use. Valacyclovir works best if it is used within 48 hours after the first symptoms of shingles or genital herpes (e.g., pain, burning, or blisters) begin to. Sept. 27, -- The drug Valtrex -- prescribed to prevent recurrences of genital herpes -- may actually help prevent the spread of the virus from one sexual. Valacyclovir is used to treat infections caused by certain types of viruses. In children, it is used to treat cold sores around the mouth (caused by herpes simplex).