Given a (nonempty) topological space $X$, if the ring of continuous functions from $X$ to the real numbers $\mathbb{R}$ (henceforth denoted as $C(X,\mathbb{R})$) is an integral domain, must it contain only constant functions?
Given any continuous function $f$, define $Z(f)$ to be the set of zeros of $f$. Then, it is easily seen that $Z(fg)=Z(f) \cup Z(g)$, and in particular, $fg=0$ if and only if $Z(f) \cup Z(g)=X$. Also, since $\{0\}$ is closed in $\mathbb{R}$ and $f$ is continuous, $Z(f)$ is closed in $X$.
So, if $X$ is not the union of any two proper closed sets (i.e. $X$ is an irreducible space), then $C(X,\mathbb{R})$ is an integral domain. But in fact, since $\mathbb{R}$ is Hausdorff, any continuous real-valued function on $X$ must be constant, and so $C(X,\mathbb{R})$ is actually isomorphic to $\mathbb{R}$.
But perhaps, there might be a non-irreducible space $X$ for which $C(X,\mathbb{R})$ is an integral domain, and it may or may not be isomorphic to $\mathbb{R}$.
The answer to the question in the title is yes.
If $f$ is a non constant, continuous function, let $a$ and $b$ be distinct points in the image of $f$.
Also let $g$ and $h$ be continuous functions from $\mathbb R$ to itself, with disjoint supports, and such that $g(a)\neq 0$ and $h(b)\neq 0$. Then the functions $g(f(x))$ and $h(f(x))$ are nonzero, but their product vanishes.