If for every continuous function $\phi$, the function $\phi \circ f$ is continuous, then $f$ is continuous. Let $X$ and $Y$ be two topological spaces and assume $Y$ is normal. Then the function $f: X \to Y$ is continuous if for every continuous function $\phi: Y \to \mathbb{R}$, the function $\phi \circ f: X \to \mathbb{R}$ is continuous.
My approach: let $U$ be an open in $Y$. Then I want to show that there exists a $\phi$ such that $\phi(U)$ is open in $\mathbb{R}$ because this would imply that $(\phi \circ f)^{-1}(\phi(U)) = f^{-1}(U)$ is open, which would yield that $f$ is continuous.
As $Y$ is normal and we just covered Urysohn's lemma, I guess it makes sense to find two closed sets $A, B$ such that $Y \backslash(A \cup B) = U$, because then by Urysohn's lemma there exists a continuous function $\phi$ such that $\phi^{-1}(\{1\}) = A$ and $\phi^{-1}(\{0\}) = B$ and $\phi(Y) = [0, 1]$, which means that $\phi(U) = \phi(Y\backslash(A \cup B) = \phi(Y)\backslash\phi(A \cup B) = ]0, 1[$ which is open in $\mathbb{R}$. I just can't manage to find those sets: the only choice I saw was the obvious $Y\backslash U$ and a singleton in $U$, but that doesn't work. Is there maybe a mistake in my reasoning so far or an easier way?
 A: $f$ is continuous iff inverse images under $f$ of closed sets are closed. Having Urysohn's lemma as a tool, we look at closed sets. BTW, I'll only use that $Y$ is Tychonoff (completely regular, so my proof assumes singletons are closed, which by your coment is the case.)
So let $C$ be closed in $Y$ and let $ p \notin f^{-1}[C]$. Then $f(p) \notin C$, so there is a continuous $\phi: Y \to \mathbb{R}$ such that $\phi(f(p)) = 0$ and $\phi[C] = \{1\}$. (Here we use Tychonoff-ness, or Urysohn for $\{f(p)\}$ and $C$). So $g=\phi \circ f$ is continuous by assumption, and $g(p) = 0$ and $g[f^{-1}[C]] = \{1\}$.
Then $0$ and $1$ have disjoint open neighbourhoods $U_0$ and $U_1$ in $\mathbb{R}$ (pick your favourites) and then note that $p \in g^{-1}[U_0]$ and $f^{-1}[C] \subseteq g^{-1}[U_1]$ are disjoint and as these are open in $X$, this shows that $p$ has a neighbourhood that is disjoint from $f^{-1}[C]$. As this can be done for all $p \notin f^{-1}[C]$, $f^{-1}[C]$ is closed in $X$. As $C$ was arbitrary, $f$ is continuous. 
