By Kris (with a "K") This is the first part of a series of posts aimed at determining whether or not James and Paul could share a drink together, if ever they were to meet up at a pub to discuss their soteriology/eschatology like real armchair-theologians.
Before we begin our discussion of the elephants in the room (e.g. faith and works), it's important that we understand what Paul, and James in particular, meant by the word "law", "instruction" or "teaching". Take your pick, but the Greek word is ὁ νόμος.
So, in simple terms and general truths—and because I'm no Pauline scholar!—I think it's safe to say that when Paul spoke of ὁ νόμος he was referring to all, or at least the instructional aspects, of the Torah.
In the same breath, I'm quick to admit that Paul also spoke of ὁ νόμος in a new light, specifically as it related to the game-changing effects brought about by the arrival of Jesus (1 Cor 9.21; Gal 6.2). But on the whole, I think it's safe to say that when Paul said νόμος he was talking about old covenant/Torah related instruction.
So where does this leave us with James?
Well, funny enough, close to Paul's transformative usage.
There are several places in James' letter where he undoubtedly uses ὁ νόμος in reference to the 4 tablets Moses received at Sinai (remember, he spiked the first two) and the related commands that followed suit.
But only several—and here they are (James 2:8–11; LEB). 
8 However, if you carry out the royal law (νόμον βασιλικὸν) according to the scripture, “You shall love your neighbor as yourself,” you are doing well.
9 But if you show partiality, you commit sin, and thus are convicted by the law (τοῦ νόμου)as transgressors.
10 For whoever keeps the whole law (ὅλον τὸν νόμον) but stumbles in one point only has become guilty of all of it.
11 For the one who said “Do not commit adultery” also said “Do not murder.” Now if you do not commit adultery but you do murder, you have become a transgressor of the law (νόμου).
So in these 4 verses James uses several different expressions to refer to the old covenant package of instructions, or at least to pieces of it.  The common thread among these back-to-back references is the presence of νόμος in some form or fashion.
Apart from these uses, however, when James mentions νόμος he has something totally different in mind. "What?" you might ask... let's take a look, and we don't have to look far. Just the next verse following 2:11 from above.
12 Thus speak and thus act as those who are going to be judged by the law of liberty (νόμου ἐλευθερίας).
With this phrase ("the law of liberty") James uses νόμος in a such a way—believe it or not—that refers to something different than the previously referred to OT instructions. 
Not buying it? Well then, let's have a quick exercise in referential tagging. This should make the connection more explicit.
The last time James used this phrase—"the law of liberty" (νόμου ἐλευθερίας)—was in 1:25:
25 But the one who looks into the perfect law of liberty (νόμον τέλειον τὸν τῆς ἐλευθερίας) and continues to do it, not being a forgetful hearer but a doer who acts, this one will be blessed in what he does.
Ok, I'll admit: he added the qualifier "perfect". Regardless, whatever these expressions in 1:25 and 2:12 refer too, they are the same thing. So to figure out 1:25, let's go back a couple verses and see what comes before.
18 By his will he gave birth to us through the message of truth (λόγῳ ἀληθείας), so that we should be a kind of first fruits of his creatures.
21 Therefore, putting aside all moral uncleanness and wicked excess, welcome with humility the implanted message (τὸν ἔμφυτον λόγον) which is able to save your souls.
22 But be doers of the message (λόγου) and not hearers only, deceiving yourselves,
23 because if anyone is a hearer of the message (λόγου) and not a doer, this one is like someone staring at his own face in a mirror,
Working backwards, you'll notice that the two mentions of "the message" in vv. 22–23 are just shorthand for the fuller expression in v. 21 "the implanted message", which is itself a re-characterization of the same referent in v. 18: "the message of truth".
Now you may already see the implicit connection between this initial phrase in v. 18 and "the perfect law of liberty"; but in case not, let me point out several clues that strongly suggest this:
- The "message" (λόγος) is supposed to be welcomed. (1:21)
- The "message" (λόγος) is supposed to be—pardon my Texas slang—done, i.e. carried out. (1:22)
- The "law of liberty" (νόμου ἐλευθερίας) is supposed to not just be welcomed, i.e. heard, but...
- The "law of liberty" (νόμου ἐλευθερίας) is supposed to be done, i.e. carried out. (1:25)
- Both the "message" (λόγος) and the "law of liberty" (νόμου ἐλευθερίας) are not simply to be welcomed/heard, but they are to be acted out and carried out.
- One should be able to be a called "a doer" (ποιητής) of both of them. (1:22, 25)
So what does this all mean?
Basically, that the phrase "the law of liberty" in 2:12 is a direct reference to a concept that was first mentioned in 1:18, albeit with different words.
It also means that when James talks about the importance of being a "doer of the law of liberty" (1:25) and to live life knowing that one will be judged by "the law of liberty" (2:12) that he's not talking about the type of νόμος that Paul so often pokes at.
Yes—both Paul and James use the word νόμος. And yes—both use this term to refer to the old covenant law, but they also both use it in a new context to liken the message and truth of the gospel to a law of freedom, a perfect law.
The key is paying attention to how they qualify it. For example, how James uses the phrase "of liberty".
And on top of this, and likely more important, is to pay attention to the way authors refer to things—because sometimes they use different expressions that still point to the same thing.
So, could James and Paul share a drink over a discussion of how they understand ὁ νόμος? At this point, I'd give a resounding "Yes!"
What do you think?
Would Paul be cool with James' call to be a doer of the law?
 James 4:11 is a potential place where he references the OT Law but, I think you'd be surprised at some of the (strong) arguments suggesting a more hybrid or full-on reading that νόμος refers to "the message of truth"/"the law of freedom".
 While I would love to get into why the phrase "the royal law" in 2:8 suggests a much more robust and rich conceptualization of the old law and the new law, in trying to keep things brief, this isn't the place. But let it be known: with this phrase James blurs the lines that we would like to draw between a hard and fast division between the old and new law, primarily by anchoring the definition of the royal law in a commandment from the Torah that sums it all up, while also fleshing out what it means to be a "doer of the message" in a manner that fulfills this call: care for widows and orphans (1:26), don't show partiality (2:1). Dang! That was one sentence. I feel like Paul.
 Note: it is important to note that the double barrel shotgun effect of "thus" (οὕτως) should be understood as aimed forward, not backwards. In other words, "thus" is cataphoric not anaphoric. In other other words, "thus" does not resume any mainline material or even mark that what follows is a result of what has preceded; instead it points the reader's gaze toward what lies ahead. "Thus" is probably a poor translation. "Speak like this and act like this" is preferred.