Thanks for your query.Based on the facts that you have posted it appears that you have acquired fungali nfection of the scrotal and penile skin due to shaving.
Please take anti fungal medication
twice daily along with topical anti fungal ointment like Meconazole twice daily.
Ensure to clean your genitals with warm water twice daily.Do not apply any antiseptic lotions.
I think it should get cured within a week.