The optimization of shape and topology of piezo‐patches or layered piezo‐electrical material attached to structural parts, such as elastic bodies, plates and shells, plays a major role in the design of smart structures, as piezo‐mechanic‐acoustic devices in loudspeakers or energy harvesters. While the design for time‐harmonic motions is genuinely frequency‐dependent, as has been reported in the literature in the context of density optimization with the SIMP‐method, time‐varying piezoelectric material has not been investigated with respect to the optimal design so far. Therefore, shape sensitivities for layered piezoelectric material and time‐varying loads and charges are derived in this paper. In particular, we provide the shape‐derivatives for nested piezo‐layers associated with a class of shape functional. More general layers can be dealt with similar approach. Copyright © 2010 John Wiley & Sons, Ltd.