First of all, instead of the word "shape" I will use topological space. Let's say that a topological space $Z$ is prime if whenever it is homeomorphic to the product $X\times Y$ of two topological spaces, either $X$ or $Y$ is a singleton.
Remark. I do not think there is a standard terminology here. The word prime is normally used in geometric topology to denote indecomposable manifolds with respect to the connected sum decomposition. For the purpose of this answer, I will disregard this notion from the manifold topology.
There were several posts on MSE regarding prime topological spaces, for instance here and here.
In particular, the real line ${\mathbb R}$ (with the standard topology) is prime, and so is the $n$-dimensional sphere $S^n$ for every $n\ge 0$. (The given proof of primeness of sphere assumes a decomposition as a product of CW complexes but the same argument using the Kunneth formula works in general if one works with the Chech cohomology.) Similarly, using the Kunneth formula one can prove that every connected surface (without boundary) is prime, except for the torus, $T^2=S^1\times S^1$, the annulus $S^1\times {\mathbb R}$ and the plane ${\mathbb R}^2$.
Another thing to note is that prime decomposition of topological spaces is not unique. The standard example is given by $S_{0,3}\times {\mathbb R}$ and $S_{1,1}\times {\mathbb R}$, where $S_{0,3}$ is $S^2$ with 3 points removed and $S_{1,1}$ is $T^2$ with one point removed. As noted above, both $S_{0,3}, S_{1,1}$ are prime but they are not homeomorphic to each other. At the same time $S_{0,3}\times {\mathbb R}$ is homeomorphic to $S_{1,1}\times {\mathbb R}$.
I do not think the study of uniqueness of product decomposition or of primeness of topological spaces is a currently active research area.