In this paper, we develop a mathematical model of an electrostatic MEMS (Micro-Electro-Mechanical systems) beam undergoing impact with a stationary electrode subsequent to pull-in. We model the contact between the beam and the substrate using a nonlinear foundation of springs and dampers. The system partial differential equation is converted into coupled nonlinear ordinary differential equations using the Galerkin method. A numerical solution is obtained by treating all nonlinear terms as external forces. We use the model to predict the contact length, natural frequencies, and mode shapes of the beam past pull-in voltage as well as the dynamic response of a shunt switch in a closing and opening sequence.