Let $R$ be a commutative ring, $RMod$ its category of modules and $CRing$ the category of commutative rings.
There's an embedding $RMod \rightarrow CRing/R$ that sends an $R$-module $M$ to the ring $$R \oplus M$$ (the direct sum taken as modules) with multiplication $(r_0,m_0)(r_1,m_1) = (r_0 r_1, r_0 m_1 + r_1 m_0)$. This functor restricts to an equivalence of categories between $RMod$ and $Ab(CRing/R)$, the category of abelian group objects in the slice category.
The projection $R \oplus M \rightarrow R$ makes this ring into a square-zero extension of $R$. My understanding is that in algebraic geometry, one thinks of a square zero extension of a ring as a kind of infinitesimal extension of $Spec (R)$. So the category of $R$-modules can be viewed geometrically as parameterizing a certain class of infinitesimal objects related to $R$.
On the other hand, of course, the category $RMod$ is equivalent to the category of quasicoherent sheaves on $Spec(R)$, which seems, to me at least, totally unrelated to my previous description.
So my question is: are these two views of the same category somehow related? When I think of the sheaf associated to a module $M$, does it somehow contain information about the corresponding infinitesimal extension? What about when I look at cohomology with coefficients in that sheaf?