I assume that you refer to the Ribbentrop-Molotov pact between Russia and Nazi Germany before the war.
Officially, they claimed that it offered both countries safety: non-agression treaties generally offer safety to both countries.
Unofficially, it allowed them to divide the European land between them among the two, which they later did in 1939.