Consider the ring $R$ of continuous functions from $\mathbb{R}$ to $\mathbb{R}$. The operations are defined as follows:
1.$(f+g)(x)=f(x)+g(x)$
2.$(fg)(x)=f(x)*g(x)$
for all $f,g \in R$, for all $x \in \mathbb{R}$.
We define a zero divisor in $R$ to be a non zero element $f$ such that $fg=0$ for some non zero $g \in R$.
The statement I'm trying to prove is this: If a non-constant function $f$ in this ring is such that $f^{-1}(\{0\})$ contains a non-empty open set $\mathcal{O}$, then this function is a zero divisor. In other words, I need to find a function $h \in R$ such that $f(x)h(x)=0$ for all $x\in \mathbb{R}$.
Here's how I tried it: We know that if a continuous real valued function $h:\mathbb{R} \rightarrow \mathbb{R}$ is non zero at some point, say, $k \in \mathbb{R}$ then there is a open set $\mathcal{O_{k}}$ containing $k$ such that $h$ is non zero on the open set as well. But, given an open set $\mathcal{O}$ can I find a function $h$ such that it does not vanish there?
Am I on the right track? Or is there another approach?