Defining shyness towards strangers in confrontational situations First of all, I would like to stress that I am not a cogsci person and I have almost no background in those areas of science.
The question is whether there exists a definition of a phenomenon I recently encoutered: A person is shy, but only in confrontational situations - has no social phobia regarding making friends and so on. Furthermore, this &quot;shyness&quot; is only demonstrated towards strangers, i.e. the person in question has no problem confronting somebody they know. Lastly, the problem occurs only in person, not over the Internet or telephone.
All in all, the question is - is this phenomenon described somewhere? And most importantly - does it have a name? Maybe it has already been defined and studied by someone.

Meaning of confrontational
By 'confrontational' I mean 'having different opinions' or 'having to sort out a disagreement'. To provide an example illustrating the problem:

After being ripped off at a restaurant (food bad, late, cold, etc), the person prefers to let the whole thing go and pay rather than argue with the waiter (thus avoiding an in-person confrontation). But,

If the person were ordering a pizza over a phone and it did not arrive for an hour, they would have no problem calling the restaurant and discussing the problem.


I'm not a native speaker :) Hope the above description clarifies the problem a little bit.
That sort of non-confrontational attitude has been researched as an aspect of interpersonal conflict-resolution style/mode/behaviour. The bulk of the research seems to have been conducted in the field of organisational psychology (which is not my field) since it's particularly relevant to how business is conducted. 

From what I've been able to glean from Google Scholar, Blake and Mouton were the first to publish on this topic, defining five interpersonal conflict-handling styles: competing, collaborating, compromising, avoiding, and accommodating. Avoiding is simply defined as withdrawing from the conflict situation. Since then other researchers have developed a number of alternatives. The Thomas-Kilmann version dropped one style, compromising, and placed the rest along two dimensions, assertiveness and cooperativeness. This is the result:



Based on your description, your friend could be described as having an avoidant conflict-resolution style when dealing with strangers. 

This is an interesting topic for me because I'm somewhat like your friend. I'm quite introverted and I suspect your friend is too to some degree, since there is a link between introversion and having an avoidant interpersonal conflict-resolution style. 

In business contexts it's not surprising to find that people who show a high need for dominance are averse to using an avoidant conflict-resolution style.

I'm not sure what the research says about why your friend might choose a different style of conflict-resolution with friends. I'll see what else I can find.

References


Blake, R.R &amp; Mouton, J.S. (1964). The Managerial Grid: The Key to Leadership Excellence. Houston: Gulf Publishing Co.
Thomas, K.W. &amp; Kilmann, R.H. (1974). The Thomas–Kilmann mode instrument. Tuxedo Park, NY: Xicom
Schneer, J.A. &amp; Chanin, M.N. (1987). Manifest Needs as Personality Predispositions to Conflict-Handling Behavior. Human Relations, 40, 575-590
Wood, V. F., &amp; Bell, P. A. (2008). Predicting interpersonal conflict resolution styles from personality characteristics. Personality and Individual Differences, 45(2), 126-131.