We introduce a new way of representing logarithmically concave functions on Rd. It allows us to extend the notion of the largest volume ellipsoid contained in a convex body to the setting of logarithmically concave functions as follows. For every s>0, we define a class of non-negative functions on Rd derived from ellipsoids in Rd+1. For any log-concave function f on Rd, and any fixed s>0, we consider functions belonging to this class, and find the one with the largest integral under the condition that it is pointwise less than or equal to f, and we call it the John s-function of f. After establishing existence and uniqueness, we give a characterization of this function similar to the one given by John in his fundamental theorem. We find that John s-functions converge to characteristic functions of ellipsoids as s tends to zero and to Gaussian densities as s tends to infinity.As an application, we prove a quantitative Helly type result: the integral of the pointwise minimum of any family of log-concave functions is at least a constant cd multiple of the integral of the pointwise minimum of a properly chosen subfamily of size 3d+2, where cd depends only on d.