The energy momentum tensor on the lattice: the scalar case