Simply take $f$ to be the function that is constant $0$ (but any function will do).
Suppose, for a contradiction, that $f$ has a countable local base $\{U_n\mid n \in \Bbb N\}$ in $\{0,1\}^{\Bbb R}$ (in the product topology).
For every $n$ we can find a basic product open subset of the form $B_n:=\prod_{r \in \Bbb R} O_r$, where each $O_r$ is open in $\{0,1\}$, and such that there is a finite subset $F_n \subseteq \Bbb R$ such that for all $r \notin F_n$ we know that $O_r=\{0,1\}$ and such that $$f \in B_n=\prod_{r \in \Bbb R} O_r \subseteq U_n\tag{1}$$
We thus know also that for $r \in F_n$ we have $O_r =\{0\}$ (the only non-trivial (open) subset that contains $0$ in $\{0,1\}$), although we won't use it. We could also have written the basic open subset as $\bigcap_{n \in F_r} \pi_r^{-1}[O_r]$, if that's more familiar to you.
So for each $n$ we have such a basic open subset that depends essentially only on a finite subset $F_n$ of $\Bbb R$ that sits inside $U_n$. Now, $\bigcup_{n \in \Bbb N} F_n$ is at most countable and so I can pick some real number $r_0 \notin \bigcup_{n \in \Bbb N} F_n$. Then define $O= \pi_{r_0}^{-1}[\{0\}] = \{g \in \{0,1\}^{\Bbb R}\mid g(r_0)=0\}$, which is an open subset of the product (it's basic open even) that contains $f$, the constantly $0$ function.
Because the $\{U_n\mid n \in \Bbb N\}$ form a local base at $f$ by assumption, we have that form some $m \in \Bbb N$:
$$U_m \subseteq O\tag{2}$$
But now define $g: \Bbb R \to \{0,1\}$ by $g(r_0)=1$ and $g(r)=0$ for all $r \neq r_0$.
Then in particular $g(r)$ is $0$ for all $r \in F_m$ (as $r_0 \notin F_m$ by how it was chosen!) and so $$g \in B_m$$ and so $$g \in U_m \subseteq O$$ by $(1)$ and $(2)$. But this contradicts that $g \notin O$ (as $g(r_0)= 1 \neq 0$)! This contradiction shows that our initial assumption that $f$ has a countable local base could not have been not correct. QED.
Note finally that we can do this proof at any point of $\{0,1\}^{\Bbb R}$, so nowhere there is a local countable base and we can even further generalise this (if you know simple cardinal arithmetic) that there cannot even be a local base of size $< |\Bbb R|$, which is a stronger fact in general.