When teachers do not know the history of science well, when they misunderstand and underestimate its educational importance, it becomes a serious obstacle for the improvement of their methodological skills. This paper has a goal to describe author's method how to teach the history of mathematics. This method is aimed at training math teacher's profession-oriented qualities. These qualities form a historical component of teacher's culture of mathematics and methodology. Besides, the paper describes the techniques and results of experimental tests for the efficiency of this method. These materials can be useful for teachers who create a cultural and historical atmosphere on math lessons at school and for university teachers who use historical mathematical ideas in their work.