If there are finitely many component spaces, the direct sum and the direct product are the same. That's not very interesting, so assume there are infinitely many component spaces. Furthermore, assume each Ci has at least two points, else Ci contributes 0 every time, and doesn't really change P or S.
Note that S is a subset of P, so declare it a subspace and give it the subspace topology from P. Let's try to understand a base open set in S.
A base open set in P restricts finitely many components to open sets and leaves the remaining components unconstrained. If z is any point in this open set, set most of its components to zero to get a point y in the corresponding base open set of S. Changing z to y is no problem, since most of the components are unconstrained. Thus S intersects every open set, and is dense in P.
If S wholly contains a base open set from P then S contains some point z in this open set, such that z is nonzero on all the unconstrained coordinates. Yet the points of S are zero almost everywhere, hence S cannot contain a base open set from P. Therefore S is not open in P. Since S is dense in P, it is not closed in P either.