Shunning is not a formal action by the ecclesiastical leaders in the LDS Church. However, some words spoken by the leaders tend to foster shunning behavior as well as insular thinking/behavior in which those who are not (or no longer) members are seen as people to be avoided.
The challenge we may confront is remaining loyal to the Savior and His Church in the face of parents, in-laws, brothers or sisters, or even our children whose conduct, beliefs, or choices make it impossible to support both Him and them. …the Lord reminds us, “He that loveth father or mother more than me is not worthy of me: and he that loveth son or daughter more than me is not worthy of me.”So although familial love continues, relationships may be interrupted and, according to the circumstances, even support or tolerance at times suspended for the sake of our higher love.
"Finding Your Life," D. Todd Christofferson, Apostle, CES Devotional for Young Adults, September 14, 2014.
A parade of anti-Christs, anti-Mormons, and apostate groups have appeared on the scene. Many are still among us and have released new floods of lies and false accusations. These faith-killers and testimony-thieves use personal contacts, the printed word, electronic media, and other means of communication to sow doubts and to disturb the peace of true believers…Avoid those who would tear down your faith. Faith-killers are to be shunned. The seeds which they plant in the minds and hearts of men grow like cancer and eat away the Spirit.
"Opposition to the Work of God," Carlos E. Asay - General Conference, October 1981.
QUESTION: At what point does showing that love cross the line into inadvertently endorsing behavior? If the son says, "Well, if you love me, can I bring my partner to our home to visit? Can we come for holidays? How do you balance that against, for example, concern for other children in the home?"
ANSWER - ELDER OAKS:…I can imagine that in most circumstances the parents would say, "Please don't do that. Don’t put us into that position." Surely if there are children in the home who would be influenced by this example, the answer would likely be that. …"Yes, come, but don’t expect to stay overnight. Don’t expect to be a lengthy house guest. Don’t expect us to take you out and introduce you to our friends, or to deal with you in a public situation that would imply our approval of your "partnership."
"Interview With Elder Dallin H. Oaks and Elder Lance B. Wickman: 'Same-Gender Attraction,'" Newsroom, 2 September 2006, ("The interview was conducted in 2006 with Elder Dallin H. Oaks, a member of the Quorum of the Twelve Apostles of the Church, and Elder Lance B. Wickman, a member of the Seventy. These senior Church leaders responded to questions from two members of the Church’s Public Affairs staff.")
Drugs, drink, pornographic materials, and subculture associations are also escape routes. …Shun those who would build themselves by destroying others.
"While They Are Waiting," Marvin J. Ashton, General Conference, April 1988.
The scriptures warn that no unclean thing can enter the presence of God…What should we do in the face of the opposition that now confronts us? There is an answer in the Old Testament.When the enemies saw that the wall was nearly up and that it was strong, they became worried. Sanballat and Geshem invited Nehemiah to meet with them in one of the villages in the plain of Ono. But Nehemiah said, “They thought to do me mischief. And I sent messengers unto them, saying, I am doing a great work, so that I cannot come down: why should the work cease, whilst I leave it, and come down to you?” (Neh. 6:2–3.) Their defense was simple and effective: “We made our prayer unto our God, and set a watch against them” and then went about the work. And that is what we should do—go about our work, strengthen the wards and the stakes, the quorums and the families and the individual members. We have a work to do. Why should it cease while we do battle with our enemies? Brethren, set a watch and make a prayer and go about the work of the Lord. Do not be drawn away to respond to enemies. In a word, ignore them.
"Come, All Ye Sons of God," By Elder Boyd K. Packer of the Quorum of the Twelve Apostles, General Conference, August, 1983.
This next one is more about shunning intellectuals and intellectual thought, but follows the same pattern:
My brothers and sisters, if there ever was a time in our history when we must be on guard against these so-called learned men or philosophers, that time is today, that time is now. We must not be asleep; we have the truth. We have the spiritual knowledge; we must preserve it.These ravening wolves are among us, sometimes from our own Church membership, and they, more than any others, are clothed in sheep’s clothing. These ravening wolves will begin to make friends with you. They will cultivate your friendship. They will invite you to their homes…Before you know it, you will find yourself slipping away from spiritual truths, spiritual knowledge, and activity in the Church. Before you know it, you have lost your faith and testimony…These ravening wolves and other so-called intellectuals, learned men and philosophers, have destroyed the morality and spirituality of millions of people. They have led multitudes into disbelief. Their ideas and attitudes that are unwholesome and unholy spread quickly. These supposedly learned men will cast doubts on your faith and testimony…My friends, beware of these faith killers and testimony killers…Jesus Christ said, “A man’s foes shall be they of his own household” (Matthew 10:36).
"Spiritual Education Is True Education," George P. Lee of the First Quorum of the Seventy, devotional given at Brigham Young University on 17 May 1983.
Frankly speaking, "ignoring" may be the better word instead of "shunning" as shown in the following quote:
The Church is like a great caravan—organized, prepared, following an appointed course, with its captains of tens and captains of hundreds all in place. What does it matter if a few barking dogs snap at the heels of the weary travelers? Or that predators claim those few who fall by the way? The caravan moves on.
"The Caravan Moves On," Bruce R. McConkie of the Quorum of the Twelve Apostles, General Conference, October 1984
During the temple interview, this question is asked of the member, "Do you support, affiliate with, or agree with any group or individual whose teachings or practices are contrary to or oppose those accepted by the Church of Jesus Christ of Latter-day Saints?" The answer to this question must be "No," or the member will fail the interview. Some members feel that to answer this question they must avoid contact with certain people. This can lead to shunning those people.
Essential to your success and happiness is the advice "Choose your friends with caution." We tend to become like those whom we admire, and they are usually our friends. We should associate with those who, like us, are planning not for temporary convenience, shallow goals, or narrow ambition—but rather with those who value the things that matter most, even eternal objectives.
"Be Thou an Example," Thomas S. Monson, First Counselor in the First Presidency, General Conference, April 2005.
A warning: there is a dark side to spiritual things. In a moment of curiosity or reckless bravado some teenagers have been tempted to toy with Satan worship. Don’t you ever do that! Don’t associate with those who do! You have no idea of the danger! Leave it alone! And there are other foolish games and activities that are on that dark side. Leave them alone!
"To Young Women and Men," Boyd K. Packer Of the Quorum of the Twelve Apostles, General Conference, April 1989.
We should associate with those who, like us, are planning not for temporary convenience, shallow goals, or narrow ambition—but rather with those who value the things that matter most, even eternal objectives.
"Be Thou an Example," Thomas S. Monson, First Counselor in the First Presidency, General Conference, April 2005.