The following is an annotated version of the fairy tale. I recommend reading the entire story before exploring the annotations, especially if you have not read the tale recently.
ONCE upon a time there lived a king who had a daughter named Cintiella. She was as beautiful as the moon, but her beauty was no match for her pride. Her pride was so great that she thought no other person in the world was good enough for her, and her poor father found it impossible to find a suitable husband for her, because no matter how good, or handsome, or brave the prince was, she found fault with him, and scorned him.
Among the many princes who came to ask her hand in marriage was a young king, who was upright, and brave, and handsome, and who loved her sincerely, but the more he tried to win her love, the more she turned from him, and the more generous he was with his affections, the more stingy she was with even her good humor. At last the young king said to her, "You cruel girl, when will you ever give your love to anyone? Are all my love and beseeching worth nothing to you, that you should abuse me so contemptably?" But she had the heart of a stone, and looked on him with anger, as if he had insulted her somehow just by loving her, and mocked him. At last the young king withdrew his attentions from her, seeing that she was hard-hearted and cold of character, and withdrew to his own country, vowing that he would never love again. But he swore an oath that he would be revenged upon the princess, and make her repent her pride and mockery.
So the king departed from the princess’s country, and he let his beard and his hair grow, and he stained his skin with walnuts so he would look tanned like a peasant. After a few months, he put on peasant’s clothes, and returned to the princess’s land, where by bribing some courtiers he was able to gain the post of king’s gardener. There he did his job as best he could, until one day he carelessly left a tray under the princess’s window, on which was a robe of such beauty and delicate workmanship that it was a marvel. Soon the ladies in waiting noticed the garment, and called the princess to see it. She was so charmed by the robe that she wanted it for herself, and sending her servants to the gardener, she asked if he would be willing to sell it. "On no account would I sell the robe," he replied, "for I am not a merchant, but I would be glad to give it to the princess if she would let me sleep in her drawing room." The servants returned with this news to the princess, who at first would hear nothing of the bargain, but at last her handmaidens said, "Your highness, you will lose nothing by this, but will gain this beautiful garment, which surely has no equal for delicate embroidery." So the princess consented, and the gardener slept in her drawing room, as he wished.
The next morning the cunning gardener left an even more beautiful gown, which matched the robe, under the princess’s window. The princess had no sooner seen it than she felt she must have it, and she sent a messenger to the gardener to ask again if he would sell it, because she would give him whatever he wanted. The gardener replied that he wouldn’t hear of selling it, for he was not a merchant, but that he would give the gown to the princess as a gift if she would allow him to sleep in her outer room. Cintiella, overcome with longing for the beautiful gown, was at last pursuaded by her ladies to let the gardener have his way, and so the gardener slept outside her bedroom door.
The third morning, the sun was barely up before a lovely underskirt of the same workmanship, which completed the outfit, appeared under the princess’s window. When Cintiella saw it, she could hardly bear the thought that she might not possess the whole ensemble, and she thought to herself, "If I don’t have this underskirt to go with the other two things, I will never be happy." This time she sent for the gardener, and she said to him, "My good man, please sell me the underskirt that is lying under my window, for I love it to distraction." He replied, "I will not sell it, my lady, but I will give it to you freely, and a necklace besides, if you allow me to sleep one night in your bedroom." Cintiella was in high dudgeon, and cried, "Wasn’t it enough that you slept in my drawing room, and then in my outer chamber? I suppose next you will want to sleep in my bed with me!" The gardener calmly retorted, "If you do not wish me to sleep in your bedroom, my lady, I will simply keep the underskirt. If you allow me to sleep in your chamber, I will sleep on the floor." Finally Cintiella, partly through greed and partly through the advice of her ladies, agreed to the bargain.
That night the gardener went to her bedroom at evening, taking with him the underskirt and the necklace. She took the things, and then directing him to one corner, said "Sleep there, and don’t move." She even drew a line on the floor with chalk, and warned him that if he crossed it, his life would be worth nothing. The gardener waited until she was deeply asleep, and then, thinking it was about time for him to dig in the garden of love, he slipped into bed and began to make love to her. Before she was well awake, the deed was done, and then she was in a quandary, for if she called for help and denounced the gardener, she would have to explain how he got into her room, and she didn’t want to admit to that, for she was far too proud. So she decided that since she was no longer a maiden, she might as well enjoy the outcome. Thus the gardener-king became her lover, and before long, she conceived a child. At first Cintiella tried to ignore the situation, but as her belly grew rounder and rounder, she finally said to her lover, "If my father finds out my plight, I will be ruined. We must think of some way to get out of this." The gardener-king, pleased at how well his plan was working, said, "If you would be willing to put off your sumptuous garments, and become a peasant like me, I will take you to an old mistress of mine who will look after you and help you when it comes time for you to give birth." Cintiella, bitterly reflecting upon how low her pride had made her sink, at length agreed to this plan, for she could see no alternative. And so the two left the palace, and journeyed into the country in the guise of two peasants.
The young king, of course, intended to take her back to his own kingdom, and so he did. He installed her in a stable near the palace, and got her a place in the kitchen as an assistant to the cook. He told his mother, the queen, what was afoot, and pursuaded her to allow him to keep up the game for awhile longer. Thus the young king began to lead a double life. For part of the day, he dressed up as a peasant, and lived in the stable with his miserable mistress, now big with child. The rest of the day he spent in the palace attending to affairs of state. One day, in his peasant guise, he pursuaded Cintiella to try to steal a scone while she was at work in the kitchen, to try to add something good to their scanty diet. With great misgivings, she did so, but while she was still in the kitchen, the king, dressed as himself, came to the kitchen and said, "Why is this dirty slut here? Why do you allow such wenches in my kitchen? Why I’ll wager that if you searched her, you’d find that she’s been stealing from me!" And of course, when they searched Cintiella, they found the scone. Oh, what slights and laughter she had to endure, as she was sent back to the stable in disgrace!
That night, the king came to her in his peasant guise, and asked her why she was so downcast. When she told him what had occurred, he told her never mind, for beggars have no choice but to follow a different moral code. When the wolf was at the door, he told her, she could be excused for stealing a few things. Later in the evening, he pretended to get another good idea. Why not offer her services to the palace seamstresses, he suggested. She needed so many things for the baby soon to be born, that it would be wonderful if she could slip a few pieces of cloth out of the palace when the seamstresses weren’t looking. Surely she couldn’t be blamed for doing that?
Not daring to disobey, for they were in desperate straits, Cintiella went to the palace the next day, and when no one was looking, she hid some homespun fabric under her clothes. But the king appeared again, dressed in his royal robes, and said, "Is this filthy whore here again? I thought I told you to get rid of her! Like as not she has stolen something again; trash like that can never be trusted to be honest." Sure enough, the fabric she had stolen was found, and heaped with scorn, she crept back to the stable weeping. Not long after, the king dressed in his peasant guise and followed her to the stable, where he found her in deep gloom, reflecting on the desperate turn her life had taken. He comforted her, and told her that morality was simply a subjective matter, and that those who were well off could afford to have hoity-toity principles. She would have another chance, he told her, to put everything right, because he had heard that the young king was to wed a great lady, and the wedding clothes were going to be made right in the palace. If she tried, he pressed, she would surely be able to smuggle a length of rich fabric out of the palace, and if they sold it, they might be able to live on the profit for some time. It took some pursuading, but Cintiella finally agreed to try one last time to steal from the palace.
The next day Cintiella crept into the palace to where the seamstresses were working, and while they were lunching hid a good length of gold brocade under her skirt. But of course the king came again, and caught her, and his wrath was so great that she was chased out of the house in utter shame. No sooner had she left the house than the king went running after her dressed in his peasant garb, because as much as he desired to shame her, he also still loved her and desired to comfort her, and was beginning to despise himself for carrying on the deception so far. He found her weeping and in anguish. She told him she was sure God was punishing her for the pride and arrogance she had felt in her former life: because she treated kings and princes like dirt, she was now being treated as she had treated them. Because she had felt no pity for their feelings, no one felt pity for her feelings now. Her shame and grief were so great that she began to feel the pains of her labor before their time.
When the queen heard of this, her heart was filled with compassion, and she resolved to play no more part in her son’s deception, and so she had Cintiella brought to her own chambers, and washed, and dressed, and put to bed in the queen’s own bed, with a coverlet encrusted with gold and pearls, and with bed hangings of cloth of gold. Cintiella marveled that the queen would treat her thus, and did not know what to say. The queen had strengthening food and drink brought to her, so her labor might be easier, and after a few hours Cintiella gave birth to twin boys, so beautiful that the like had never been seen.
But while she and the queen were rejoicing in the birth of the two infants, the king burst in, crying, "What is this woman doing in here? Is this a bed for a low slut? What can you be thinking? You might just as well throw cloth of gold over an ass!" But the queen said, "That’s enough, my son. Continue this no more. You have made this poor child endure enough hardships and torment; you have reduced her to rags, and humiliated her enough to satisfy even the basest insult you might have received at her hands. If there is any debt left to be paid, let it be paid by these two lovely children which she has just given you."
Being so chastised by his mother, the king was abashed. Then he kissed his little babes, and embraced Cintiella, begging her pardon. When he embraced her, Cintiella recognized him as her lover, and she listened quietly as he told her that he had shamed her so because of the disdain and mockery he had received at her hands. He promised to treat her as a queen from that moment, and to hold her as dear as his own life. Then the queen mother embraced Cintiella also, and great was her joy in her husband and children. But ever afterward she remembered to behave with kindness and humility, realizing that "Ruin is the offspring of pride."
Basile, Giambattista. Il Pentamerone. Day 4, Tale 10.