Electrostatic shock waves are observed both in cosmic plasma and in laboratory experiments on plasma heating and confinement, laser methods for accelerating charged particles, and generating high-frequency radiation. In this work, numerical simulation of the generation of ion-acoustic collisionless shock waves in multicomponent plasma as a result of the decay of the density discontinuity and localized density perturbation using the PIC-method was carried out. Two analytical approaches for the electron density distribution are compared with the kinetic simulation with the real ion-to-electron mass ratio.