Here's a sketch: further simplifications should be done as needed. You need to find a normal field to the hypersurface, as usual. Namely, if $$\Sigma
= \{ (x,f(x)) \mid x \in M \},$$parametrize it with $\psi\colon M \to \Sigma \subseteq M \times_\phi \Bbb R$ given by $\psi(x) = (x,f(x))$, so $${\rm d}\psi_x(v) = v+ {\rm d}f_x(v)\partial_t$$ for all $v \in T_xM$, according to the decomposition $T_{(x,t)}(M\times_\phi \Bbb R) \cong T_xM \oplus \Bbb R\partial_t$. Let $N = N_0 + h\partial_t$, with $N_0$ tangent to $M$ and $h$ a smooth function on $M$, be a normal field. Being normal means that $$g_x(v, (N_0)_x) + \phi(x)^2 h(x){\rm d}f_x(v) = 0$$for all $v \in T_xM$. Rewrite this as $$g_x(v, (N_0)_x + \phi(x)^2 h(x)\,{\rm grad}_g f|_x) = 0,$$and use non-degeneracy of $g$ to see that a unit normal field along $\Sigma$ is $$N= \frac{-\phi^2{\rm grad}_gf + \partial_t}{\phi\sqrt{1+\phi^2\|{\rm d}f\|^2}}.$$The second fundamental form will be given by ${\rm II}(X,Y) = \langle A_N(X),Y\rangle N$, where $A_N(X) = -
(\nabla_XN)^\top$ is the Weingarten operator associated to $N$. If $v = v+c\partial_t \in T_{(x,f(x))}\Sigma$, a straightforward computation gives that $$v^\top = v + (c-{\rm d}f_x(v))\frac{\phi^2\,{\rm grad}_gf}{1+\phi^2\|{\rm d}f\|^2} + \left(c+\frac{{\rm d}f_x(v)-c}{1+\phi^2\|{\rm d}f\|^2}\right)\partial_t.$$Writing $X = X_0+a\partial_t$, $Y = Y_0+b\partial_t$, with $a = X_0(f)$ and $b = Y_0(f)$, and $X_0, Y_0 \perp \partial_t$, applying the above formula for $v = -\nabla_XN$ gives $A_N(X)$, and then $\langle A_N(X),Y\rangle$ gives ${\rm II}$. One should expect ${\rm d}\phi\,{\rm d}f$ and ${\rm Hess}(f)$ in the final formula.
You're correct that this is absurd; the error is in your definition of sectional curvature, discussed below. The computation about principal curvatures is correct, and gets at some interesting phenomena exhibited by minimal submanifolds. For instance, all embedded minimal $2$-manifolds of Riemannian manifolds are "saddle-shaped" in the sense that $\lambda_1 \lambda_2 \leq 0$, and as a consequence their sectional curvatures are bounded above by the sectional curvatures of the ambient space.
In the case of embedded $2$-dimensional submanifolds $(M^2, g)$ of $\mathbb{R}^3$, the scalar curvature of $M$ at $p$ is (twice) the product of the principal curvatures at $p$, which is independent of the realization of $(M^2,g)$ as a Riemannian submanifold of $\mathbb{R}^3$ by Gauss's Theorem Egregium. In this case, the observation is fully correct: every embedded minimal surface in $\mathbb{R}^3$ has nonpositive scalar curvature everywhere.
In general though, the products of principal curvatures of a Riemannian submanifold $(M,g) \subset (M',g')$ depend heavily on the realization of $(M,g)$ inside $(M',g')$, and upon $(M',g')$. Accordingly, the sectional curvatures of $M$ are defined purely in terms of $(M,g)$, and not in terms of an embedding of $(M,g)$ elsewhere.
Best Answer
In general, for a function $f:X\to Y$, the graph of $f$ is a subset of $X\times Y$ given by $$ \text{graph}(f)=\left\{(x,f(x)):x\in X\right\} $$ Since your graph is a subset of the warped product space $M\times\mathbb{R}$, it makes sense that $f$ would be a function from $M$ to $\mathbb{R}$.