The Food and Drug Administration has approved a generic treatment for shingles and genital herpes made by Actavis, the drug maker said Wednesday.