  We present a conceptual and uniform interpretation of the methods of integral
representations of L-functions (period integrals, Rankin-Selberg integrals).
This leads to: (i) a way to classify of such integrals, based on the
classification of certain embeddings of spherical varieties (whenever the
latter is available), (ii) a conjecture which would imply a vast generalization
of the method, and (iii) an explanation of the phenomenon of "weight factors"
in a relative trace formula. We also prove results of independent interest,
such as the generalized Cartan decomposition for spherical varieties of split
groups over p-adic fields (following an argument of Gaitsgory and Nadler).
