Among infinitely many other places, this issue is discussed in Sections 4.3 and 4.4 of my notes on commutative algebra:
http://alpha.math.uga.edu/~pete/integral.pdf
In Section 4.3 I give Mariano's definition, with some commentary. A slight drawback to this definition is that it makes the associativity of the product look mysterious. In Section 4.4, I mention that this may be viewed as a special case of the semigroup algebra construction, namely we may define $R[x]$ to be the set of all finitely nonzero functions $t: \mathbb{N} \rightarrow R$ -- this is algebra, so $\mathbb{N} = \{{\bf 0},1,2,\ldots\}$ -- with pointwise addition and convolution product. The associativity still has to be checked, but it is relatively satisfying to do this once and for all in this level of generality. (And this will probably come in handy elsewhere, e.g. the associativity of the convolution product is precisely the content of the Möbius Inversion Formula.)
On the other hand -- when $R$ is commutative, as I assume from now on -- of course it does make sense to plug in a polynomial at any element of $R$: in other words, a polynomial determines a function from $R$ to $R$. Indeed, the evaluation map gives a homomorphism of rings from $R[t]$ to the ring of all functions from $R$ to $R$ under pointwise addition and pointwise multiplication. As I mention in my notes, when $R$ is an infinite integral domain, this evaluation map is injective and one can use this to deduce the associativity of the multiplication in $R[t]$ for free.
However, when $R$ is finite it is important to distinguish between polynomials in the formal sense and polynomial functions. In particular, your definition of a polynomial is not correct when $R$ is e.g. the finite field $\mathbb{Z}/p\mathbb{Z}$, because it does not distinguish between the polynomial $x^p - x$ and the zero polynomial: both induce the zero function. (That multiple polynomials may determine the same function has some positive aspects as well; it can be used to give a proof of the Chevalley-Warning theorem.)