I know that a profinite group is residually finite. I am interested in the converse, which seems true. My reasoning is as follows. Please let me know if I am making some mistakes.
Let $G$ be a residually finite group. Then $G$ can be seen as a subgroup of the cartesian product (or even direct product) of finite groups, say $G_i$ where $I$ is some indexing set. There are projection maps from $G$ to $G_i$, which we will assume to be onto for all $i \in I$. Now, consider a directed set, say $J$, whose elements are the finite subsets of $I$, where the ordering is given by inclusion. For finite subsets $A, B$ of I such that $A \leq B$ consider natural projection maps $\pi_{A,B}:\prod_{i \in B} G_i \to \prod_{i \in A} G_i$. Now the projective system $(\prod_{i \in A}G_i, \pi_{A,B}, J)$, where $A, B\in J$, forms a projective system with limit $G$. Thus $G$ is a profinite group.
This is false. An infinite profinite group is uncountable, so e.g. $\mathbb{Z}$ is residually finite but not profinite.
You have not shown, and it is not true, that the projective system you wrote down has limit $G$. I have not checked this carefully but you should instead get the profinite completion of $G$.