There may be no cause/effect relationship here just coincidence. If you think the shaving is spreading the infection try and alum block after the shave as it is a very effective disinfectant.