If you develop pustules over the beard region, after the shave, then they are unlikely to be pimples. In all probability, it is folliculitis due to bacterial infection.
Another condition which is brought about by shaving is pseudofolliculitis. This occurs in those who have curly hair growing in different directions. Shaving with electric razor may help. Otherwise the only way out is to keep a beard and trim it.