Teachers often use analogies to introduce unfamiliar or complex concepts. However, several studies have found that their knowledge on how to use them is limited or superficial. Similarly, the integration of technological resources in the teaching-learning processes is not always carried out efficiently, which evidences the need to improve teachers' digital competence. This paper provides a formative sequence on the use of analogies in teaching through mediation of technological resources, implemented in the context of the initial training of secondary education teachers. The results show a positive assessment by the students, a change in their perceptions on the subject and some progress in their classroom proposal designs. The conclusion is that it is necessary to train future teachers to deal with common teaching problems in a reflective, comprehensive and innovative way, which will undoubtedly be one of the challenges of education in the 21st century.