A modified Godunov scheme possessing monotonicity and second-order accuracy is used in the framework of an equilibrium model to consider the propagation of shock waves in a gas-liquid foam with a highly nonuniform density distribution. A comparison of the numerical simulation and experimental studies reveals the basic features of the gasdynamic disturbances that arise in two-phase media of this kind.