Hello,
First of all, choose a non perfumed hypoallergenic shaving foam/
cream and after applying it shave in the direction of the hair growth. After shaving apply ice(wrapped in a towel) and some calamine lotion on the skin which helps in soothing. You can also take some over the counter anti-inflammatory like ibuprofen after shaving. For the next few days, you can exfoliate at regular intervals with a mild scrub.
Hope it helps.