This is not the standard way to prove the higher homotopy groups of $S^1$ are trivial, but I'll bite.
First, a series of lemmas.
Lemma 0: Each connected component of $\mathbb{Z}$ (i.e, each point) is contractible - the identity map, restricted to each component, is homotopic to a constant map.
Proof: The connected components are points, so the identity map is constant.
Lemma 1: $\mathbb{R}^n$ is contractible, that is, the identity map is homotopic to a constant map.
Proof: Consider the homotopy $F(x,t) = tx$. When $t=0$, this is a constant map and when $t=1$, it's the identity map. (I'll leave it to you to prove $F$ is continuous).
Lemma 2: If $X$ is contractible, then all homotopy groups are trivial.
Proof: Given a map $g:S^n\rightarrow X$, we need to find a homotopy between $g$ and a constant map. Well, let $F$ be a homotopy witnessing the contractibility of $X$. Then the map $G:S^n\times I$ defined by $G(x,t) = F(g(x),t)$ has the desired properties.
Putting this altogether shows that $\pi_i(\mathbb{Z}) = \pi_i(\mathbb{R}) = \{e\}$ for $i > 0$ (where we pick a component of $\mathbb{Z}$ once and for all). Can you take it from there?