Little pimples that pop up after shaving are not pimples in the traditional sense. Most often, they are either ingrown hairs or the body’s reaction to the injury of shaving. The bumps can get infected, particularly if you pick at them, which could lead to a pimple-like pustule, so you should not scratch, squeeze, pinch or dig at the bumps in an effort to get rid of them.
Treat irritated bumps immediately with hydrocortisone cream. Hydrocortisone is a topical steroid, and it reduces inflammation. Two treatments a day for a couple of days should clear up the worst of the shaving pimples.