The link between devotion to Mary's Immaculate Heart and the Sacred Heart of Jesus is shown in the following passage:
"...a short time after Pascal had carried out the first experiments in modern physics and Descartes had perfected the mathematical instruments which would make possible the development of the sciences, Jesus appeared to an obscure nun and, showing her his heart, said to her: 'This is the heart that has so loved men.'
"Then, as men did not listen to the message of Paray-le-Monial and the corruption of the world continued, the Virgin Mary appeared to the children at Fatima; she showed them her heart and said: 'The Lord wishes to establish devotion to my Immaculate Heart in the world. If what I say is done, many souls will be saved and there will be peace.'
"The remedy that God offers for the evils of the world is to show us his heart and that of his Mother. 'We have learned to recognize the love God has in our regard, to recognize it, and make it our belief,' said St John (I John 4.16).
"The Christian solution to the problem and desperate call of the world will always be to believe in love, to give ourselves up to it and so receive the will and the strength to serve others." (Fr Henri Marduel, "The Christian Pursuit," London, Burns & Oates, 1964, p. 22).
Historically, devotion to the Heart of Mary grew up in parallel, but at a lesser pitch than that of devotion to the Heart of Jesus, only starting to become more prominent during the time of St John Eudes. Even then it was not until after the Apparitions at Rue du Bac concerning the "Miraculous Medal" made to Catherine Labouré in 1830, and the establishment of a society dedicated to the Immaculate Heart of Mary, at the Church of Our Lady of Victories in Paris in 1836, that this particular devotion became really well known.
Since then devotion to the Immaculate Heart of Mary, has gradually grown more widespread in the Church, particularly since the apparitions at Fatima.
The main difference between these two devotions is that the one concerned with Jesus emphasises his divine heart as being full of love for mankind, but with this love for the most part being ignored or rejected, while devotion to Mary's heart is essentially concerned with the love that her heart has for Jesus, for God.
It is not an end in itself, and really the love of her heart is meant to be a model for the way we should love God. So as in all things Marian, she leads us closer to God, rather than becoming an obstacle in our way. The fact that her heart is immaculate, that is sinless, means that she is the only fully human person who is able to really love God in the way that he should be loved.
Honouring Mary's Immaculate Heart is really just another way of honouring Mary as the person who was chosen to be the Mother of God, recognising her extraordinary holiness and the immense love she bestowed on Jesus as his mother, the person who was called to share in and co-operate in his redemptive sufferings.
The whole aim of this devotion is to unite mankind to God through Mary's heart, and this process involves the ideas of consecration and reparation. A person is consecrated to Mary's Immaculate Heart as a way of being completely devoted to God. This involves a total gift of self, something only ultimately possible with reference to God; but Mary is our intermediary in this process of consecration.
There have been some criticisms of the whole idea of "consecration" to Mary, with some arguing that it is improper to speak in such terms, since it obscures the essential consecration to God. This position, though, seems to go against the traditional approach as exemplified by St Louis de Montfort, one that has been essentially accepted and acted upon by Pius XII and John Paul II in the twentieth century.
If it was unacceptable to consecrate the world to Mary's Immaculate Heart then obviously the above popes would not have done so. To criticise the principle of Marian consecration is also to lose sight of the central reality of the various Marian apparitions, that they concern Mary rather than Jesus.
If Jesus had only wanted a consecration to his own Sacred Heart, then clearly he, rather than Mary, would have appeared repeatedly over the last several centuries. The fact that it is Mary who has appeared in so many places, and that the Church at its highest level has accepted this, indicates that Mary's role is central and that consecration to her is not illogical, providing it is clearly understood that "belonging to Mary is a privileged means of belonging to Christ."
In reality because of the strong analogy between Jesus and Mary, the consecration to Mary's Immaculate Heart is closely linked to the consecration to Jesus' Sacred Heart, although it is subordinate and dependent on it. That is, although the act of consecration is ultimately addressed to God, it is an act that is made through Mary.