  We study the interaction energy between two surfaces, one of them flat, the
other describable as the composition of a small-amplitude corrugation and a
slightly curved, smooth surface. The corrugation, represented by a spatially
random variable, involves Fourier wavelengths shorter than the (local)
curvature radii of the smooth component of the surface. After averaging the
interaction energy over the corrugation distribution, we obtain an expression
which only depends on the smooth component. We then approximate that functional
by means of a derivative expansion, calculating explicitly the leading and
next-to-leading order terms in that approximation scheme. We analyze the
resulting interplay between shape and roughness corrections for some specific
corrugation models in the cases of electrostatic and Casimir interactions.
