Given is a mass $M$ at the origin of the coordinate system, and another mass $m$ which is locate at $\vec{x}$
I have to show that the force acting on $m$ is a gradient field.
My approach:
I define the vector field as:
$$\vec{F}(\vec{x}) = \frac{mMG}{|x|^2} \cdot \frac{\vec{x}}{|x|}$$
does it help if I parametrize $\vec{x}$ though spherical coordinates? In that case, how would I compute the "backwards" (integration) step to find the potential, $\vec{F}(\vec{x}) = - \vec{\nabla}\phi$ ?
$\require{cancel}$ Yes, you can certainly parametrize the vector ${\bf x}$ in spherical coordinates, in which case
$$ {\bf F} = \color{red}{-} GMm \frac{\hat{\bf r}}{r^2} \tag{1} $$
and the potential is
$$ \phi = -\frac{GMm}{r} \tag{2} $$
which certainly satisfies
\begin{eqnarray} -\nabla\phi &=& -\frac{\partial \phi}{\partial r}\hat{\mathbf r} - \frac{1}{r}\color{blue}{\cancelto{0}{\frac{\partial \phi}{\partial \theta}}}\hat{\boldsymbol \theta} - \frac{1}{r\sin\theta}\color{blue}{\cancelto{0}{\frac{\partial \phi}{\partial \varphi}}}\hat{\boldsymbol \varphi} \\ &\stackrel{(2)}{=}& -\frac{\partial}{\partial r}\left(-\frac{GMm}{r}\right)\hat{\mathbf r} \\ &=& -\frac{GMm}{r^2} \hat{\mathbf r} \\ &\stackrel{(1)}{=}& {\bf F} \end{eqnarray}