In this paper, an integrated and modular control design is developed for distributed energy resources (DERs) to stabilize power systems and minimize effects of load variations and intermittent generation. Traditionally, the droop control of each generator (or virtual power plant) works as a local feedback loop to track frequency during load disturbance, whereas automatic generation control (AGC) calculates control signals and sends them to each generator with the goal of matching the total generation and load in the overall system. The droop control and the AGC work separately, therefore the two controls often conflict each other. The proposed design enables us to modularly synthesize an integrated control for each of the DERs by using both local and wide-area measurements so that the controls work together in enhancing stability and performance of the power system. The design methodology admits the full nonlinear power flow equations, and it results in a data-driven control that in real-time takes into account the nonlinear power flow interactions (in terms of current angle measurements) and adaptively adjusts parameters of the controls that operate the DERs. The design framework uses the concept of passivity-short systems to analyze individual DERs and quantify their dynamic responses in such a way that the resulting system-wide implementation becomes plug-and-play. Simulations are done to demonstrate the effectiveness of the proposed methodology and design.