Karma refers to the reward or fruit of action. When one commits a good deed, it is returned back to him/her. When one commits a bad deed(sin), it is also returned back.
Can it be transferred to someone else?
There are accounts of saints taking on the sicknesses (or bad karma) of others in order to relieve them of their misery throughout history. But this is done voluntarily by the saint, rather than by the disciple.
For example the great Saint/Avatar Chaitanya Mahaprabhu is believed to have taken the sins of the people Jagai and Madai story as given below here:
Later Jagai and Madhai came before the Lord with folded hands. Lord Chaitanya then requested the brothers to give the Lord a tulsi leaf saying, "I will take your sinful reactions. Give them all to Me." At first the brothers refused saying, "O Lord You do not know how sinful we are. We can not do it." The brothers reminded the Lord that they had killed many cows, brahmins, women, and given trouble to countless innocent persons. But the Lord insisted and finally it was done. When Lord Chaitanya received the sins of Jagai and Madhai the Lord lost his golden complexion and He immediately became black.
However this cannot be done by all. Only the great Yogis, the great Avatars and the great Saints can do this. Others may be able to but it is dangerous to attempt such things as taking on another's fruits without proper intuition and Divine Will.
Swami Paramahansa Yogananda speaks of this 'Autobiography of a Yogi':
The metaphysical method of physical transfer of disease is known to highly advanced yogis. A strong man can assist a weaker one by helping to carry his heavy load; a spiritual superman is able to minimize his disciples' physical or mental burdens by sharing the karma of their past actions. Just as a rich man loses some money when he pays off a large debt for his prodigal son, who is thus saved from dire consequences of his own folly, so a master willingly sacrifices a portion of his bodily wealth to lighten the misery of disciples.
By a secret method, the yogi unites his mind and astral vehicle with those of a suffering individual; the disease is conveyed, wholly or in part, to the saint's body. Having harvested God on the physical field, a master no longer cares what happens to that material form. Though he may allow it to register a certain disease in order to relieve others, his mind is never affected; he considers himself fortunate in being able to render such aid.
So it is clear that not all can/should attempt to take on the karma of another preson. So then what else to do with the bad karma. Sin can not only be transferred but also removed.
How to circumvent sin?
to one person, the daily job gives great misery and seems like a great sin committed, but yet to another person who is unemployed the daily job seems to be a great blessing. Therefore both persons are envying each other, while not happy with what they have. Then what really is a sin? It is only sin if we choose to think of it as sin. Just as the world looks green when we have green spectacles, the world appears to be dual when we wear the 'good & evil' spectacles of the Mind. Thus realizing this will destroy all sin.
Sri Adi Shankaracharya states in aparokshanubhuti 98:
All actions of man, Perishes when one is able to see, Brahman which is in the higher and also lower
Through devotion to God:
a the child accepts both the sweet-tasting chocolate as well as the bitter-tasting vegetables from the parents, in trust that the parent Loves the child and will do only what is best. Similarly trust in the Lord, that whatever happens is controlled by Him and is done for our own Good. Then this leads to surrender and leads to acceptance. When we accept all as gift of God, there is no sin, there is only gift. This requires faith.
Sri Krishna states in Bhagavad Gita 18, 66:
Abandon all varieties of religion and just surrender unto Me. I shall deliver you from all sinful reaction. Do not fear.
Through karma yoga (doing good deeds without expecting results):
simple logic: if what we do comes back to us, then why do bad? thereby spend all of time doing good day and night, until we realize that in our joy of giving, we do not care for receiving anything. Then where is the need to think of ourself? Selflessness thereby dawns and destroys all sins.
Sri Swamiji Sivanandaji on Practice of Karma Yoga:
The practice of Nishkamya Karma Yoga destroys sins and impurities of the mind and causes Chitta Suddhi or purity of the Antahkarana.
What about going around nine planets in temple?
Like the all great rituals of Hinduism if done with conviction, sincerity, purity and love then it will also result in removal of sins. However if done mechanically with thoughts of "I have to go here today", "I have to get Y today", "What will Z do today", "What to eat" etc. then it is not as effective. Thus concentration and discipline is the key.
Sri Ramakrishna says in "The Five Commandments of Sri Ramakrishna" by Swami Dayatmananda:
We have to impress on our minds that purity of thought and sincerity of purpose are the essential conditions one has to achieve and develop in the religious life if it is to be expeditiously fruitful. An aspirant must practise self-control. He has to avoid all slips in ethical life and should live a life of discipline. These are the sine qua non of the higher life, and it is well-known that nothing will happen if spiritual disciplines are practised perfunctorily.
When that purity of purpose and sincerity in sadhana is achieved and when one tries in secret and in solitude and with single-minded devotion to repeat the name of God, His vision will come and the devotee will get absorbed in Him. This chanting of God's name must form a regular habit.