There’s a minhag to bake challah with a key in it on the Friday after Pesach. Alternatively, people bake challot with the design of a key. Both options are brought down in the name of Rabbi Avraham Yehoshua Heschel of Apt, the Ohev Yisrael.
Although it may originally come from non-Jewish sources – the Ohev Yisrael died in 1825, which is quite recent – “shlissel challah” also might allude to Masechet Taanit 2a-b, where Rabbi Yochanan lists the three [or four] keys which are given exclusively to G-d and not to any messenger; one of them is the key of livelihood.
If this custom serves to remind us that G-d is in control of our livelihood, then it sounds lovely. There are numerous other reasons given for the minhag, many of which can serve as helpful symbols of our dependence upon Hashem.
However, it seems that many people see this as a “segulah” – that is, something that helps “cause” livelihood. In other words, there are many people who treat this as if it actually helps with livelihood. That makes it a kind of magic; and if that’s the way a person understands it, it is theologically shallow and worse, a likely Torah prohibition of Nichush. It’s also goes against the positive command of תמים תהיה עם ה’ אלוקיך.
As Torah Jews, our obligation is not to manipulate spiritual forces in order to get something. We must rely on G-d, by building a relationship with Him through prayer and other legitimate methods. Shlissel challah as a means of changing our fate is illegitimate. It either means that we think of G-d as a machine which responds to our pushing the right buttons, or else that we believe that we can go behind His back and get what we want regardless of what He decided. Either way, it is an example of a religious custom which is actually the opposite.
Again: if it is a symbol of reliance upon Hashem, then it may be a very helpful and healthy minhag (as long as you don’t swallow the key; that would make it significantly less healthy). But if you think it has an effect upon the world, it’s more pagan than Jewish.
(Two important comments are in order: 1) Whether or not there are spiritual forces that may be manipulated is a completely different question from whether it is permissible to do so. Some would say that the entire idea is silly; others would say that there are levels of being that transcend our understanding. But even if (for the sake of argument) shlissel challah would “work,” that in no way makes it halachically legitimate. 2) Someone might argue that reliance upon Hashem rather than upon various spiritual forces means that visiting doctors should also be prohibited. Yes! – except that there is an explicit pasuk (Shmot 21:19) which Tanna d’vei Rabbi Yishmael uses to permit doctors to heal (Baba Kama 85a, and see Tosafot ד”ה שניתנה that this permission extends to all forms of injury and sickness). The fact that the Torah needs to give permission to doctors implies that other forms of “manipulating G-d” are illegitimate.)