Said Benrahma scored a brilliant goal for West Ham on his return to Brentford as the east London side won 1-0 in a pre-season friendly.
Benrahma hit the top corner of the net with a 30-yard strike midway through the second half.
New signing Frank Onyeka played the first half for the Bees, who will host Spanish side Valencia next weekend.
Shandon Baptiste, on as a half-time substitute and recently back from a knee injury, almost equalised when he fired against the post from near the edge of the penalty area.
Brentford: Gunnarsson (Raya 45), Roerslev (Stevens 75), Goode (Jansson 45), Sorensen (Norgaard 61), Pinnock, Henry (Thompson 45), Janelt (Mbeumo 61), Onyeka (Baptise 45), Canos (Ghoddos 45), Dervisoglu (Toney 61), Forss (Fosu 75).