The disjoint union of two 2-spheres is a compact 2-manifold. It definitely knots in $\Bbb R^5$ as detected by the linking number. That is, the degree $\alpha$ of $S^2\times S^2\to S^4$, $(p,q)\mapsto \frac{f(p)-g(q)}{||f(p)-g(q)||}$, calling our link $p\sqcup q:S^2\sqcup S^2\to\Bbb R^5$. I'm afraid the linking number is the only invariant here. Since $S^2$ unknots in $\Bbb R^5$ (see below), the exterior of one component is homotopy equivalent to $S^2$, and the linking number is also the degree $\lambda$ of $p(S^2)\to S^5\setminus q(S^2)\simeq S^2$. [In different dimensions, where $\alpha$ and $\lambda$ are not numbers but homotopy classes of spheroids (more precisely $\alpha$ factors though a spheroid up to homotopy, upon killing the wedge), their relation is more interesting: $\alpha$ equals the suspension of $\lambda$ (up to a sign).] Now if $M$ is a connected compact $2$-manifold, then it PL unknots in $\Bbb R^5$; more generally, $k$-connected $n$-manifolds PL embed in $\Bbb R^{2n-k}$ and PL unknot in $\Bbb R^{2n-k+1}$, as long as the codimension is at least three, by Penrose-Whitehead-Zeeman and Irwin. Also by Haefliger, smooth, PL and topological knot theories coincide for smooth $n$-manifolds in smooth $m$-manifolds, where $m>\frac{3(n+1)}2$ (this includes $2$-manifolds in $\Bbb R^5$).