What did we do in our previous lives to become a shy person in this life?
There are different types of shynesses.
shyness towards doing evil: This is a result of understanding that evil deeds are undignified and demeaning. It's an aspect of wisdom.
stage shyness or shyness to talk to people: This is a result of inferiority complex. It's caused by ignorance and aversion.
Since it is said by the wise, that a person of integrity, one having developed virtue, Sīla, is able to approach what ever kind of gathering, upright and without fear, and fear has a cause which is not free from faults, it seems to be proper to conclude from it, that lack of virtue is a cause of shyness at first place.
It's also proper if saying that a person of much debts is someone seeks out for hidding and acts shy, which meets the first approach at it's root as well: e.g. a poor (in merits, using kammic measures) person or a just very greedy and stingy person (macchariya), who is up to a lot of gain but not willing to "pay the price" for certain gain.
Shyness, like pointed out here already, is not a general bad thing, but only to be shy in doing what is skilfull and proper to do.
At least shyness to act proper and skillfully and lack of shyness in avoiding to act improper un unskilfuly is a matter of avija, not-knowing of what is proper and skillful either in a certain sociaty to last comfortable in it, or for long-term happiness beyond.
To avoid not knowing, to change to knowing, one has to approach those who know and as it is said by the wise, being not very bright is, acting foolish, to say nothing about stupidity, is caused by not approaching and asking those who know, wise (Brahmans and Contemplatives). So to change such, gaining Nissaya (good condition, foundation), visit as much as possible:
brahman or contemplative, an ask: 'What is skillful, venerable sir? What is unskillful? What is blameworthy? What is blameless? What should be cultivated? What should not be cultivated? What, having been done by me, will be for my long-term harm & suffering? Or what, having been done by me, will be for my long-term welfare & happiness?'
Also useful: The Karma of Questions: Essays on the Buddhist Path, and Questions of Skill
To learn and get used to right and wrong shyness, association with people of integrity is very importand as to avoid places where people are not shy to transgress even basics without fear that such actions fall back to them.
It's not possible to learn and addopt virtue and generosity, the main pillows to gain merits, a good stand and freedom from fear, it dwelling in areas where people are used to train each other ignorance and kinds of equanimity to let go of what ever shyness that might come between their situation and desires.
As the highest blessings counts as starter: "Not to associate with the foolish, but to associate with the wise, and to honor those worthy of honor — this is the highest blessing." and ends with "unshakeable peace".
As adviced by the wise, people not free from aversion, should be observed from distance, to get not possible hurt.
Shyness is Coward; prompted.
Some shyness mind is new karma; some is karma's resultant.
The past prompted karma give prompted resultant. And prompted resultant support new prompted karma.
In abhidhamma, minds and mental factor of sasaṅkhārika (prompted) mind is coward. However, there are two main causes of shyness: kamma cause (missaka-pakatūpanissaya-nānakkhaṇikakamma-paccaya), and habit cause (suddha-pakatūpanissaya-paccaya).
- Kamma cause is 4 prompted attachment minds, 1 prompted rudeness minds, and 4 prompted beautiful wholesome minds, which cause of rebirth. Prompted resultant of it is the rebirth 4 prompted beautiful resultant minds.
- Habit cause is the remote&vanished 4 prompted attachment minds, 1 prompted rudeness minds, and 12 prompted beautiful wholesome minds, which is not Kamma cause. Prompted resultant of it is 4 prompted attachment minds, 1 prompted rudeness minds, 4 prompted beautiful wholesome mimds 4 prompted beautiful kiriya minds.
What is sasaṅkhārika (prompted)? (src)
This is purely a technical term used in a specific sense in the Abhidhamma. It is formed of 'sam', well and Ö 'kar', to do, to prepare, to accomplish. Literally, it means accomplishing, preparing, arranging.
Like dhamma, sankhāra also is a multi-significant term. Its precise meaning is to be understood according to the context.
When used as one of the five 'aggregates' (pañcakkhandha), it refers to all the mental states, except vedanā and saññā. In the paticca-samuppāda it is applied to all moral and immoral activities, good and bad thoughts. When sankhāra is used to signify that which is subject to change, sorrow, etc., it is invariably applied to all conditioned things.
In this particular instance the term is used with 'sa' = co-; and a = un, Sa-sankhārika (lit., with effort) is that which is prompted, instigated, or induced by oneself or by another. 'Asankhārika' (lit., without effort) is that which is thus unaffected, but done spontaneously.
If, for instance, one does an act, induced by another, or after much deliberation or premeditation on one's part, then it is sa-sankhārika. If, on the contrary, one does it instantly without any external or internal inducement, or any premeditation, then it is asankhārika.
How can the practitioner comprehends shyness?
4 prompted attachment minds (src)
Attachment mind, prompted, accompanied by pleasure, connected with wrong view,
Attachment mind, prompted, accompanied by pleasure, disconnected with wrong view
Attachment mind, prompted, accompanied by indifference, connected with wrong view
Attachment mind, prompted, accompanied by indifference, disconnected with wrong view
1 prompted rudeness minds (src)
Rudeness mind, prompted, accompanied by displeasure, connected with ill-will
Mental factors: Twenty-two factors enter into combination - namely, twelve aññasamānas, and 4 angry mental factors, 2 boring mental factors, and 4 ignorant mental factors (12 + 4 + 2 + 4 = 22)
12 prompted beautiful minds (src)
Beautiful consciousness, prompted, accompanied by pleasure, associated with knowledge. x3 (wholesome, resultant, kiriyā)
Beautiful consciousness, prompted, accompanied by pleasure, dissociated with knowledge, x3
Beautiful consciousness, prompted, accompanied by indifference, associated with knowledge,x3
Beautiful consciousness, prompted, accompanied by indifference, dissociated with knowledge.x3
Mental factors: thirty-six factors enter into combination - namely, thirteen aññasamānas, and twenty-five beautiful mental factors (13 + 25 = 38)