There are two major arguments between R. Yehuda and R. Shimon. One is about a davar she'eino miskavein, meaning that one doesn't want the melacha that will result from the action being done AND it is not inevitable. Another is about melacha she'ein tzricha l'gufa which means that one intends to do the melacha, but not for the purpose that it is normally done for.
The argument about דבר שאינו מתכוין is a general argument in all areas of Torah, not limited to Hilchos Shabbos but the machlokes about מלאכה שא"צ לגופה is a machlokes specifically in Hilchos Shabbos about what qualifies as a מלאכת מחשבת, which makes the criteria for a shabbos violation higher.
The gemara is also clear in many places that R. Shimon admits that if the דבר שאינו מתכוין is going to inevitably result in a melacha - פסיק רישא, it is forbidden. However, it is not clear if it would be a Torah violation or merely a Rabbinic violation. Tosafos assumes that since a דבר שאינו מתכוין has the advantage that one doesn't intend to violate the melacha, even if it is a פסיק רישא and inevitable, it should be no worse than a מלאכה שאינה צריכה לגופה and therefore for shabbos one would be patur, but in other areas of Torah one would be chayev. The implication of Tosafos is that a פסיק רישא would technically qualify as a מלאכת מחשבת, just that if the person isn't interested in the outcome, they are still patur because it is a מלאכה שא"צ לגופה. But if they would be happy with the outcome, although that was not their intent, they would be chayev since a פסיק רישא does qualify as a meleches machsheves. That is why Tosafos holds that acc. to R. Yehuda who says that a מלאכה שא"צ לגופה is chayev, even if one does a דבר שאינו מתכוין which is a פסיק רישא, they will be chayev. Similarly, the Maharsham cites Tosafos Rid in Yoma that according to R. Shimon who exempts for a מלאכה שאינה צריכה לגופה he will also exempt for a pesik reisha and hold that it's only assur m'drabonon, but according to R. Yehuda he will be chayev for a פסיק רישא. Not everyone agrees to this. The Eglei Tal (melacha of baking, 55:5) cites the Terumas HaDeshen 265 and Rivash (394) who both say that even if one would desire the outcome of the pesik reisha, since they aren't intending to do that melacha, it still would not qualify as a מלאכת מחשבת and they would be patur.