In this work, we study codes generated by elements in the skew group matrix ring
M
k
(
R
)
⋊
φ
G
M_k(R)\rtimes _{\varphi }G
, where
R
R
is a finite commutative Frobenius ring,
G
G
is an arbitrary finite group, and
φ
\varphi
is a group homomorphism from
G
G
to
A
u
t
(
M
k
(
R
)
)
Aut(M_k(R))
. We then determine all possible group homomorphisms
φ
:
G
→
A
u
t
(
M
2
(
F
2
)
)
,
\varphi : G \rightarrow Aut(M_2(\mathbb {F}_2)),
for the cases where
G
G
is a cyclic group and a dihedral group. Finally, by using skew generator matrices we provide examples of binary self-dual codes and also binary linear optimal codes.