We usually think of Shabbos as a mitzvah which is bein adam lamakom. The two primary reasons given in the Aseres haDibros for Shabbos suggest this understanding is correct. In Parshas Yisro the mitzvah of Shabbos is presented as zecher lemaaseh breishis, and in in Parshas Vaeschanan the emphasis is placed on Shabbos being zecher leyetsias Mitzrayim. Both of these reasons clearly are in the realm of our relationship with Hashem. In Parshas Mishpatim, however, a third reason is given for Shabbos which is relevant to bein adam lachaveiro. There we are taught that Shabbos enables everyone to rest, even the workers and the downtrodden members of society. We are given Shabbos so that all can enjoy this day of rest equally.
The notion of Shabbos enhancing our relationship with our fellow man is stressed in two place by Yeshayahu hanavi. In the haftorah we read on fast days we are called upon to act justly and kindly with our fellow man. Yet in the same prophecy we are reminded to observe Shabbos. This relationship between justice, kindness, and Shabbos observance is repeated by Yeshayahu in the haftorah of Yom Kippur morning. After a long warning concerning those whose fast is superficial and do not act kindly to those in need, Yeshayahu concludes by reminding us to observe Shabbos properly. What is the significance of this connection between Shabbos and kindness?
There is another kind of Shabbos that we observe that also has elements of bein adam lachaveiro and bein adam lamakom, and that is the Shabbos observed by Eretz Yisroel every seven years. The mitzvah of Shemittah is introduced to us in Parshas Behar with the phrase, "veshavsa haaretz Shabbos laHashem." The land rests for Hashem. Clearly this is the aspect of Shemittah which is bein adam lamakom. Yet, shemittah is presented also as a mitzvah bein adam lachaveiro. All produce is ownerless during Shemittah. The poor and rich eat together. The differences between the classes in society disappear as all enjoy the fruit of the land equally. This dual aspect of Shemittah being both a Shabbos Lashem as well as a way of bringing people together conjures up the same image as does the weekly Shabbos. It is a day of zecher lemaaseh breishis as well as "vayinafesh ben amascha vehager" - a time when all members of society rest together.
How do Shabbos and Shemittah accomplish this dual goal? What is the significance of being a time for connecting both to Hashem and to our fellow man? The root cause for injustice and cruelty in society is the attitude that we are the masters of the world. We will do anything to succeed even at the expense of others, and once we have succeeded there is no need to share what we have attained with others. This selfishness will create a society of injustice on which kindness doesn't exist. The prototype of such a society was Sodom. Rashi (Breishis 13:13) comments that the citizens of Sodom were not only unjust and cruel, but also sinful against Hashem. This rebellion against Hashem was the root of their cruelty. One who doesn't recognize that Hashem is the master of the world will perpetrate the injustice and cruelty that permeated Sodom.
The Torah wants to set up a society of justice and kindness. By recognizing Hashem, rather than ourselves, as the Master of the world, we look upon others as our equals who deserve to be treated with fairness and kindness. The two mitzvos of Shabbos and Shemittah declare that Hashem is the Master of the world; He is the creator, and it is He who ultimately owns the land. By internalizing this message we look at our fellow man in an entirely different light. It is the bein adam lamakom of these two mitzvos that lays the foundation for the bein adam lachaveiro. It is only through the proper observance of these two Shabasos that we can build a society of justice and kindness.