The architecture of interaction networks has been extensively studied in the past decades, and different topologies have been observed in natural systems. Despite several phenomenological explanations proposed, we still understand little of the mechanisms that generate those topologies. Here we present a mechanistic model based on the integrative hypothesis of specialization, which aims at explaining the emergence of topology and specialization in consumer-resource networks. By following three first-principles and adjusting five parameters, our model was able to generate synthetic weighted networks that show the main patterns of topology and specialization observed in nature. Our results prove that topology emergence is possible without network-level selection. In our simulations, the intensity of trade-offs in the performance of each consumer species on different resource species is the main factor driving network topology. We predict that interaction networks with low species diversity and low dissimilarity between resources should have a nested topology, although more diverse networks with large dissimilarity should have a compound topology. Additionally, our results highlight scale as a key factor. Our model generates predictions consistent with ecological and evolutionary theories and real-world observations. Therefore, it supports the IHS as a useful conceptual framework to study the architecture of interaction networks.