Question first, motivation afterwards.
Let $P$ be the vector space of all real polynomials (with no restriction on the degree). Is there an inner product $\langle p\!\mid\!q\rangle$ on $P$, and a fixed polynomial $q\in P$, such that $$\langle p\!\mid\!q\rangle=p(0)$$ for all $p\in P$?
Motivation. This kind of thing is always possible on a finite-dimensional space $V$ over the field $F=\Bbb R$ or $F=\Bbb C$: moreover, even if the inner product is specified, and a linear functional $\phi:V\to F$ is specified (replacing the map $p\mapsto p(0)$), one can always find a suitable $q$.
It can also sometimes be done in infinite dimensional spaces: for example, if $$\langle p\!\mid\!q\rangle=\int_{-1}^1 p(x)q(x)\,dx\quad\hbox{and}\quad \phi(p)=\int_{-1}^1 p(x)\,dx\ ,$$ then obviously $\langle p\!\mid\!1\rangle=\phi(p)$ for all $p$.
If the functional is $p\mapsto p(0)$ then the "obvious attempt" is something like $$\langle p\!\mid\!q\rangle=p(0)q(0)+p(1)q(1)+\cdots\ ,$$ but this will not converge.
I was given an answer to this question which went something like "blah blah Hilbert space blah blah" and which I didn't understand at all, so it would be great if that could be avoided.
To generalize Ian's answer: if you have any real vector space $V$ and any functional $\alpha:V\to\mathbb{R}$, you can put an inner product on $V$ such that there is an element $q\in V$ such that $\alpha(p)=\langle p\mid q\rangle$. Indeed, you may assume $\alpha\neq 0$, and choose a vector $q\in V$ such that $\alpha(q)=1$. Now let $B$ be a basis for $\ker(\alpha)$; then $C=B\cup\{q\}$ is a basis for $V$. Take the inner product on $V$ induced by this basis (i.e., to compute the inner product, expand each vector with respect to the basis and then take the dot product of their coefficients). Since $\alpha$ vanishes on every basis vector except $q$ and $\alpha(q)=1$, $\alpha(p)$ is just the coefficient of $q$ in the basis expansion of $p$ for all $p\in V$. That is, $\alpha(p)=\langle p\mid q\rangle$.