To fully exploit their full potential, new semiconductor nanowire building blocks with ab initio controlled shapes are desired. However, and despite the great synthetic advances achieved, the ability to control nanowire's geometry has been significantly limited. Here, we demonstrate a simple confinement-guided nanowire growth method that enables to predesign not only the chemical and physical attributes of the synthesized nanowires but also allows a perfect and unlimited control over their geometry. Our method allows the synthesis of semiconductor nanowires in a wide variety of two-dimensional shapes such as any kinked (different turning angles), sinusoidal, linear, and spiral shapes, so that practically any desired geometry can be defined. The shape-controlled nanowires can be grown on almost any substrate such as silicon wafer, quartz and glass slides, and even on plastic substrates (e.g., Kapton HN).