Here are two options for a Consecration to St Joseph.
O Blessed Joseph, such are your virtues and the power of your intercession with God, that you are worthy to be venerated, loved and invoked before all the Saints. In
the presence of Jesus who chose you as His father on earth, and of Mary who accepted you as her husband, I ask you to be my advocate with both, and my protector and father. I place my soul and body in your special protection. To you I entrust all my hopes and consolations, pains and miseries, my whole life and its last moment so that, through your holy intercession and your merits, everything I do may be in accordance with the will of your Divine Foster-Son.
O dearest St Joseph, I consecrate myself to your honour and give myself to you, that you may always be my father, my protector and my guide in the way of salvation. Obtain for me a greater purity of heart and fervent love of the interior life. After your example may I do all my actions for the greater glory of God, in union with the Divine Heart of Jesus and the Immaculate Heart of Mary. O Blessed St Joseph, pray for me, that I may share in the peace and joy of your holy death. Amen.
This prayer can be found in St Joseph: Prayers & Devotions. Explaining the effects of devotion to St Joseph over the centuries, this booklet is a practical and simple way for people to foster a devotional spirit and can be used individually or in parish groups.