The shape–environment relationship in plants refers to the ways in which the physical characteristics and structures of plants are influenced by their environment. Plants have evolved a remarkable ability to adapt to their specific habitats, and their shape and form play a crucial role in determining their survival and reproductive success. This study aimed to examine differences in size and shape between morphological traits in mountain germander (Teucrium montanumL.) from different geological substrates (calcareous and serpentinite). For this study, 400 individuals ofT. montanumfrom 20 populations (ten populations from the serpentinite and ten from the calcareous substrate) were selected. Using the geometric morphometrics approach, it was shown that the degree of phenotypic variation in the size and shape of the corolla, leaf, and stem ofT. montanumdepends on the type of substrate. The main differences between the populations are the narrower part of the lower lip of the corolla, the narrower leaf, and the wider central part of the vascular system stem from serpentinite populations. The results of this study will contribute to a better understanding of the morphological variability ofT. montanumin relation to edaphic conditions. In addition, the results confirm that certain morphological differences play an important role in the adaptive response in relation to substrate composition, especially for substrates with increased metal content, such as serpentinite. The shape–environment relationship in plants could define diversity and complexity in plant life, and underscores the importance of shape as a key factor in their survival and success in different habitats.