For (my) simplicity, I will keep $8\pi G=1$. Taking inspiration from this paper, I think it's possible to show what you ask only if you include explicitly also the lapse function $N$ in the FRW metric, like this:
\begin{equation}\label{met}
ds^2 = - N^2\, dt^2 + a^2(t)\, \frac{dr^2}{1-k\, r^2}+ r^2\, d\Omega^2\, ,
\end{equation}
The associated Lagrangian would be
\begin{equation}\label{lagr}
\mathcal{L} = 3\, \left( N\, a\, k - \frac{a\, \dot{a}^2}{N} \right) + a^3 \left( \frac{\dot{\phi}^2}{2\, N} -N\, \mathcal{V}(\phi) \right)\, ,
\end{equation}
with generalized coordinates $\{a,\phi,N\}$. The canonical momentum associated to $N$ is $p_N=0$, which means that actually $N$ is not a dynamical degree of freedom, and it equals a generic constant: that is why usually one writes the FRW metric without $N$, because the case $N=1$ can be achieved by a simple, and always allowed, redefinition of the metric time $N\, dt \rightarrow dt$ (one can say that it's a gauge choice).
Now, what happens if you want to try and get anyway the dynamics of the non-dynamical degree of freedom $N$? You can use Euler-Lagrange equations with the Lagrangian above and see that the result is
\begin{equation}\label{fried}
\frac{\partial\, \mathcal{L}}{\partial\, N} - \frac{d}{dt}\, \frac{\partial\, \mathcal{L}}{\partial\, \dot{N}} = 0\quad \Rightarrow\quad 3\, \frac{1}{N^2}\frac{\dot{a}^2}{a^2} + 3\, \frac{k}{a^2} -\frac{1}{2\, N^2}\dot{\phi}^2 - V(\phi) = 0\, .
\end{equation}
This looks already similar to (the Hamiltonian that you found) $\, =0$, the difference being, of course, the presence of $N$. But, as we saw, $N$ is a constant and we still have the gauge freedom to redefine the time variable: so you can simply redefine the time derivatives in the equation above with $N\, dt \rightarrow dt$ (which amounts to the gauge choice $N=1$) and find in this way the usual Friedmann equation.
The point is that, in some cases, it is good to have $N$ explicit because it makes evident the presence of a constraint: the trajectories in the phase space of this model are constrained on the energy surface $\mathcal{H}=0$, and Friedmann equation is an expression of such energy balance.
It seems you are after some sort of geometric understanding of what the components of the Ricci tensor "tell us", so I'll try to give some indications in this regard.
Intrinsic curvature is described by the Riemann tensor, and its effects can be qualitatively decomposed into
- "volumetric" curvature, described by the Ricci tensor, the trace of the Riemann one,
- "deviatoric" curvature, described by the Weyl tensor, the traceless part of the Riemann one.
Let us focus on the first. By "volumetric" I mean that it distorts spacetime in a way which "expands" or "contracts" volumes compared to the corresponding Euclidean manifold.
In this wikipedia page you can find an expression for the volume element expanded around a point that uses the Ricci tensor.
This can be used to understand what the $ij$ components of the Ricci tensor "do".
If all of them are zero, the space may not be Euclidean, but its volume element is (try multiplying all the diagonal entries in the Schwarzschild metric, for example).
There still can be curvature, though, and it will be described by the Weyl tensor.
In the sphere case, the fact that $R_{\phi \phi} = \sin^2 \theta$ means that volume (or area, in this case) along the $\phi$ direction is "squished" as $\theta$ decreases.
If you are near a Pole, for example, a small coordinate rectangle with sides $\Delta \theta$ and $\Delta \phi$ will have a smaller area than a rectangle with the same parameters drawn at the equator, and it will be compressed along the $\phi$ direction, while the $\theta$ direction will remain untouched.
Best Answer
$k$ is not a measure of the curvature of spacetime, but rather of the spatial sections. $k = 0$ doesn't mean that spacetime is flat (your example isn't: since $a(t) \neq a_0$, it can't be Minkowski spacetime), but rather that the spatial sections are just the Euclidean $\mathbb{R}^3$ space rather than, for example, a $3$-sphere.
It is also possible to get it the other way around: for $R = 0$, one can get a FLRW solution with $k \neq 0$. The Milne model is such an example (it is just the future light-cone of the origin in Minkowski spacetime).
As one can see from explicit computation for the general $k$ FLRW metric (or by looking up on Wikipedia, as I'm doing right now), the full expression for $R$ including the contribution from $k$ is $$R = 6 \left(\frac{\ddot{a}}{a} + \frac{\dot{a}^2}{a^2} + \frac{k}{a^2}\right).$$
You can, though, compute the Ricci scalar for the spatial section. Using the metric $$\text{d}s^2 = - \text{d}t^2 + a(t)^2 \left(\frac{\text{d}r^2}{1 - k r^2} + r^2 \text{d}\Omega^2\right),$$ which has spatial metric $$\text{d}l^2 = \frac{a(t)^2 \text{d}r^2}{1 - k r^2} + a(t)^2 r^2 \text{d}\Omega^2,$$ I got (with the aid of the Mathematica package OGRE) the expression $${}^{(3)}R = \frac{6k}{a^2(t)}.$$
Hence, you can understand $k$ as being proportional to the Ricci scalar of the spatial section.