We develop a new technique for preshapcal systems (MEMS). In general, MEMS are excited using an electrostatic field which is a nonlinear function of the states and the input voltage. Due to the nonlinearity, the frequency of the device response to a step input depends on the input magnitude. Therefore, traditional shaping techniques which are based on linear theory fail to provide good performance over the whole input range. The technique we propose combines the equations describing the static response of the device, an energy balance argument, and an approximate nonlinear analytical solution of the device response to preshape the voltage commands. As an example, we consider set-point stabilization of an electrostatically actuated torsional micromirror. The shaped commands are applied to drive the micromirror to a desired tilt angle with zero residual vibrations. Simulations show that fast mirror switching operation with almost zero overshoot can be realized using this technique. The proposed methodology accounts for the energy of the significant higher modes and can be used to shape input commands applied to other nonlinear micro-and macro-systems.