If my understanding of scripture in this matter is correct, shunning was admonished in several cases. John says "if anyone denies that christ has come in the flesh do not recieve him into your house, or wish him well in his endeveors."
I know there are other scriptures too, one that mentions not even eating with such a one, but its talking about greedy persons, idolators, fornicators and such. Again in 1 Cor. 5.
I dont know for what your friends friend was dfd for, but the few scriptures that mention shunning, are for believers who continue in their gross sin, and do not repent. To my knowledge though, There is never a case where someone is shunned or "put out" for associating with the shunned person.
Paul even talked about Hymineus (not sure of spelling) and another brother who departed from the faith, and he turned these two over to satan for the destruction of the flesh. (Corinthians-around chapt.14) Interesting that even chapter 5 of 1Cor. talks about the same thing, delivering these to satan for the destruction of the flesh, but that the SPIRIT may be saved.