To prove this, you're going to have to use the compactness theorem, together with a neat trick: expanding the language by a constant. You want to take the theory of $G$ and get a model of that theory with an element $g$ satisfying "I have infinite order." There are a couple of problems with this:
"I have infinite order" isn't a first-order formula. (Actually, this is a good thing - otherwise the problem would be false. Do you see why?)
How are we going to talk about $g$, given that there's no symbol for it in our language (and that probably no such element even exists in $G$ in the first place)?
These are solved as follows:
Can you think of a set of formulas $\Sigma$ in the language of groups such that satisfying every formula in $\Sigma$ is the same as having infinite order?
Expand the language of groups by a new constant symbol "$c$" (intended to name the mysterious $g$ we want). We now want a new theory $T$ in this language, a model of which will count as our $H$. Being a model of $T$ should imply being elementarily equivalent to $G$, so we certainly want $Th(G)\subseteq T$, but we also want to ensure that $c$ corresponds to an element of infinite order:
What axioms should we add to $Th(G)$ to accomplish this? (Think about the previous bullet.)
Why is the resulting theory $T$ consistent? (What hypothesis on $G$ do we have to use here?)
Why is any model of $T$ a group that's elementarily equivalent to $G$? (Note that this isn't actually true on the nose - there is one final, very small step you have to do to get the group you want.)
EDIT: A small comment on the axiom of choice (in response to Moishe Cohen's answer): the axiom of choice is not necessary for this problem. There are two points here.
First, we don't actually need to take ultrapowers to build the desired $H$ - the compactness theorem alone suffices.
Second, although compactness is often proved using ultraproducts, this is unnecessary: it can also be proved by Henkinization. Not only does this avoid the specific machinery of ultraproducts, it also avoids the axiom of choice, at least in this case: while it is true that the full compactness theorem$^1$ requires choice$^2$ in the step where we pass from a theory to a completion of that theory$^3$, the compactness theorem for well-orderable languages is provable in ZF alone since for well-orderable languages Henkinization never needs to invoke choice at all. In particular, the language of groups + a constant symbol is finite, so we don't need choice here.
That said, ultrapowers are really cool, and once you're comfortable with them they let you build a wide variety of examples of structures with interesting properties.
$^1$That is, for arbitrary languages.
$^2$In the sense that it is not provable from ZF alone - it's still much weaker than the full axiom of choice
$^3$In this step, for arbitrary languages, we really do need an ultrafilter - namely, an ultrafilter on the Lindenbaum algebra. In fact, this turns out to be exactly what we need to prove the compactness theorem.