Hello, are you sure it is ringworm and not mites, Mites are the most common,
Did you take you piggy to the vet? I have listed two links below that should help you.
These species specific microscopic mites cause unbearable itchiness for the animal and can result in thinning and/or patchy loss of hair, scurfing of the skin (may resemble dandruff) and eventually, open sores as a result of extreme scratching and biting which aggravates the hair loss. Scratching an area of skin infested by mites by hand may produce such pain and irritation in your cavy that it looks like it's having a fit. A guinea pig suffering from mites may become less friendly and be reluctant to interact with its owner.
While skin scrapings may confirm mites, scrapings are frequently omitted because they are so unreliable, Often a vet will administer ivermectin in the presence only of itching and hair loss, treating for other conditions such as fungal infections in the absence of improvement. It is important to note that your cavy may be suffering from more than one condition. Fungal Infections and Their Treatment For Guinea Pigs Treatment for mites For Guinea pigs