Which would be correct?

They or Them and I are buying some groceries. Would it be They?

Yes, "they" is correct. Would you say? They are buying, or Them are buying?

They is a subject pronoun; them is an object pronoun.