We never put our kids to bed or asked them to sleep. We always left it up to them. I realize that this is a rare behavior in Western cultures nowadays, so let me briefly explain what happened:
Since our children were never asked or expected to sleep or stay in bed at any given time, they developed no resistance against it whatsoever. They had a strong awareness of the needs of their bodies quite early in their lives, and usually acted accordingly (went to bed on their own). The amount of sleep that they got during a day seemed not less than kids whose parents paid strong attention to it. Their transition into sleep was usually (not to say always) smooth and without any hassle from our end. Most of the time they did not initially fall asleep in their own beds but on the couch next to us or so. Often they picked up their blankets from their beds first to use them on the couch, and we later carried them to their beds together with the blankets. If they got up at night and came to sleep in our bed, we'd let them, sometimes they also decided to fall asleep there from the start, which was typically the case when they went to bed together with us at the same time.
When they were babies, we usually carried them around on our backs when they were emotionally unstable or even obviously tired. They were not expected to fall asleep there, but they usually did because they couldn't move much.
Sleeping times of our kids were a little irregular, sometimes they'd sleep as early as 6 p.m., sometimes 10 p.m. or midnight, we soon had experience based on several things they experienced during the day, but we could never clearly predict it. There were usually naps throughout the day too.
We never had a problem with not being able to sleep in the mornings because our kids were up at times like 5 a.m. They usually got up in time for daycare after we woke them up, but sometimes they were still a little sleepy at first, but totally fine after about 10 minutes. I sometimes observed myself get a little tense when they wouldn't get up immediately, but that's maybe my personal issue.
When they grew a little older, they happily slept in their own beds always and stopped coming to us at night, except like when they were sick or so.
If somebody feels that their kids have to be in bed at a certain time for any reason and they're wondering how to achieve it, I think they should be aware of what it's probably like from the perspective of the child: They're not totally tired (otherwise they'd be sleeping anyway), there's usually some fuss about going to bed that makes them even more exhilarated, it's a wonderful game because parents always play along and are so funny when doing so, and it's the only choice that is given to them anyway, for instance because the room is left dark, the procedure alienates them from listening to their body, so in return they will have a harder time realizing when they are really tired if this is the case, and won't lie down on their own to sleep.
I don't really get why so many parents decide to do this, I see little sense in it, but I don't want to judge that it's wrong in any particular case.
But yes, if you want your kid to do this thing that they can't possibly comprehend in the necessary depth at their age, it's natural that you have to use some kind of conditioning, that is usually rewards or punishments (classical conditioning doesn't seem to make sense here). Rewarding sleep is difficult from a practical point of view, but if you can do it, it'll be great. Punishing not to sleep is useless, how would we as adults deal with something like that after all? All you can reasonably do is reward staying in bed or punish not to stay in bed, and at the time avoiding the opposites, whereas attention can also be experienced as rewarding by the kid, especially if it's experienced as part of a game.
I think shouting at them or losing your temper may not be the best choice with regard to the aim of gentle conditioning (avoiding causing traumas), but if everything is already working perfectly after the first incident, and the child doesn't show any other signs of being traumatized (sudden change in character), I would not overrate it. Obviously your kid realized a boundary that you personally set there and this is often what is sufficient for them to respect it.
A general experience I made while observing quite a couple of other parents and families is that the only thing that makes kids sleep is they getting sleepy. That's the indispensable precondition. Anything that is arousing, like threatening, shouting, opening and closing doors, arguing, creating an emotionally tense situation, isolating the kid if they actually want to be with you, making the kid feel they have to do something they can't control by will (sleeping), showing irregular behavior in response to what they do (so they never experience a reliable and predictable situation and must always be prepared for everything) etc. is usually counterproductive, at least in the situation at hand. It may pay off later, but I wouldn't see it as guaranteed. In this respect I would personally be willing to ignore a lot, even playing in the room after I put them in bed. The message should be clear: After I put you in bed, I relax, and you can relax too, and I'm sure sooner or later you will. Good night, and sweet dreams, my sweety!
Many kids fall asleep much more easily when you read a story to them when they're already in bed. This is especially useful in settings where for organizational reasons children must sleep by a schedule (e.g. daycare), but it also works wonderfully at home for many kids. You have to read to them anyway, and doing it long enough while they're in bed already slightly sleepy will usually make them fall asleep soon after you leave the room or even while you're still reading. It'll relax you too and strengthen the bond with your kid. If the kid regularly experiences that stories make him/her fall asleep gently, this could also turn out to be one of these rewards for sleep I was mentioning earlier: Sleep gets associated with the positive emotions felt while being read a story to and then after a while sleep on its own is felt as a rewarding thing to be sought.